Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vue.js VSCode Vetur Emmet and Scaffold Snippets not recognized

I am using Vue.js on VSCode, and I installed Vetur for formatting. According to this video, there should be Scaffold snippets and Emmett code completion. None of that shows up on VSCode. When I type "scaffold" into a .vue file, there's no autocomplete. When I type "h1" into a .vue file, there's also no autocomplete. Anyone know how to solve this problem?

like image 374
Andrea Avatar asked May 25 '20 01:05

Andrea


People also ask

How do I debug Vue JS in Visual Studio code?

Go to the Debug view, select the 'vuejs: chrome/firefox' configuration, then press F5 or click the green play button.

What is Vetur?

Vetur is powered by the Vue Language Server and provides us with syntax highlighting, Emmet (for increased HTML/CSS workflow), snippets, linting, IntelliSense, and more. This greatly improves our development experience and is widely supported, with over 1,000 stars on GitHub.

How do I run a Vue js file?

js App" on http://localhost:8080 in your browser. You can press Ctrl+C to stop the vue-cli-service server. cd my-app code . VS Code will launch and display your Vue application in the File Explorer.


3 Answers

Just type vue instead of scaffold:

enter image description here

See the final result:

enter image description here

like image 77
Misael da Costa Homem Avatar answered Oct 21 '22 16:10

Misael da Costa Homem


Please have a look at this https://issuehunt.io/r/vuejs/vetur/issues/1325, here they explain it's not: scaffold but vue.

like image 32
Leroy Meijer Avatar answered Oct 21 '22 14:10

Leroy Meijer


following configurations,then, restart vscode, it will work

{
    "emmet.triggerExpansionOnTab": true,
    "emmet.includeLanguages": { 
        "vue-html": "html",    
        "vue": "html"  
    }
}
like image 5
yuanbaby Avatar answered Oct 21 '22 16:10

yuanbaby