Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting/autocomplete broken for .vue files #1107

Closed
3 tasks
burkgames opened this issue Feb 20, 2019 · 8 comments
Closed
3 tasks

Syntax highlighting/autocomplete broken for .vue files #1107

burkgames opened this issue Feb 20, 2019 · 8 comments

Comments

@burkgames
Copy link

burkgames commented Feb 20, 2019

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Win 10 64
  • Vetur version:0.16.1
  • VS Code version:1.31.1

Problem

1、none highlight for data/components/methods/props...
image

2、import component from *.vue,complete with autocomplete...
image

if import component with none suffix,none autocomplete...
image

Reproducible Case

  • update to the lates vs code
  • updated to the lates vetur
  • open a .vue file
  • observe
@dezmou
Copy link

dezmou commented Feb 20, 2019

Same here, for example the autocomplete for javascript in .vue in <script> tag is not working, yet it work good in .js files.

in both vscode and code-insiders

@robertracz
Copy link

robertracz commented Feb 20, 2019

Hey guys, same issue here. Somehow in .vue file inside script tag export default {... cannot resolve the Vue alias... if I do export default new Vue({...}) then it starts working but that's not a solution.

@octref
Copy link
Member

octref commented Feb 20, 2019

The syntax highlighting is working for me. Did you install any other Vue extensions?

image

For importing with .vue suffix, see FAQ.

@robertracz
Copy link

Hey @octref thanks for the quick response. So actually it turned out it was due to the fact that I opened my vscode in the parent directory of my SPA app :) I'm assuming some configuration files were not loaded correctly although the AutoComplete for the imports work (I already have a jsconfig in the root).

Not sure if we need to account for that in general, but I think it'd be helpful to come up with a documented workaround and/or highlight it in the FAQ. All the dotnet core apps have a solution folder that groups your projects together so I'm guessing I wasn't the only one who messed this up. This is my first vue project however I've had several React front end projects set up and never similar issues.

Let me know what you think,

Rob

@slanden
Copy link

slanden commented Feb 24, 2019

@robertracz I have the same problem as you and others, and I also was in a parent directory (vue app in one subfolder, backend node app in another) but reopening vscode in the vue app folder did not fix the issue for me

@octref
Copy link
Member

octref commented Mar 21, 2019

@robertracz That is tracked in #815.

@octref octref closed this as completed Mar 21, 2019
@kimini507
Copy link

Hi, I'm also having a similar problem in one of my .vue files

Tried to:
Open/close file
Uninstall/install vetur
Restart VSCode

vetur bug

@octref
Copy link
Member

octref commented Apr 8, 2019

@kimini507 Please open new issue with full file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants