vetur: Both Emmet and Scaffold Snippets not working

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

Info

  • Platform: Ubuntu 18.04
  • Vetur version: 0.21.0
  • VS Code version: 1.35.0 (vscodium)

Problem

Typing scaffold into a new Vue file does nothing. No IntelliSense, no expanding.

Also, Emmet is not working inside <template> unless this option is set:

"emmet.includeLanguages": {
  "vue": "html"
}

Reproducible Case

  1. Fresh installation of vscode/vscodium.
  2. Install Vetur.
  3. Create a new file, select type as Vue.
  4. Try some Snippets. In my case scaffold and h1 inside <template>.
  5. Both are not recognized.

Yes, not much of an info. Could I do anything to help debug this?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 18
  • Comments: 35 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Apparently on the new versions you have to use “vue” instead of “scaffold”

Type <vue> and it works

@dave2k2 If the “vue” command is not working for you, you can bring back the scaffold by creating a personal snippet for it. If you use vscode, go to Code>Preferences>User Snippets, type vue on the input that will show up and paste this code there:

https://gist.github.com/rochabianca/2c39f611b28dfb51f0fb3ff483afbf51

I made some minor changes, like init the template with a div with the name of the file and already put the name too on the script but you can remove this changes by removing the lines 6 and 11

“vue” creates the template scaffold for me with Vetur 0.22.2 on Windows 10, vscode 1.37.1

According to the updated documentation @zeroidentidad @davexpression and @rochabianca are all correct <vue will work however, simply writing vue will not work without the < first. One other option is to start with the word default; def has done the trick for me. Screen Shot 2562-12-23 at 12 13 16 PM Screen Shot 2562-12-23 at 12 13 27 PM

@bdrtsky Vetur works just fine on Linux Mint for me.

as @davexpression and @rochabianca said scaffold was replaced by type <vue

For those who are facing the Emmet problem in visual studio code, add this in your settings.json and it should work 😄

"emmet.includeLanguages": {
        "javascript": "javascriptreact",
        "vue-html": "html",
        "vue": "html",
    }
}

image

@bdrtsky You need to open a folder for Vetur to work, as it resolves dependencies from local node_modules:

image

Apparently on the new versions you have to use “vue” instead of “scaffold”

In my case, the intellisense for snippet is <vue> or .vue. Look this:

Captura de Tela 2020-04-17 às 12 43 39

plus one on Vetur 0.22.0 - windows 10

@seanfarmar It’s because the scaffold changed its name for vue (don’t know about the emmet problem through) so it shouldn’t work if you type scaffold. But if you want that back, you can use my gist, here

If you’re on Debian Linux and using VS Code, you might not get Scoffold Snippets instead type <vue> and hit enter, and it all works.

Type <vue> and it works

you are a God, tks!!!

Try default It will definitely work

@rochabianca that’s pretty awesome thanks…actually it’s even better!