vetur
vetur copied to clipboard
HTML snippet does not work in vue-html region
VScode snippets do not work on .vue files after installing vetur
it works when I disable vetur
not work
Enabled
Disabled
not work
I noticed that it works if it's outside the and
The problem is we declare the region <template> as vue-html, so html snippets won't work here. I have opened an upstream issue to track this support: Microsoft/vscode/issues/47096
@octref Looks like upstream issue was closed.
@jericopulvera @xpopit
Are the snippets your own snippets or snippets from other extensions?
If they are your own snippets, you can add "scope": ["vue-html"] to them.
For snippets from other extensions, there is no easy way to make them available under another language. I've reopened the upstream issue.
Yeap I tried as well and seems does not work on a new Vue.js file
I had this problem as well. It may be a dumb question, but are you sure that VS Code detected that the language to be Vue? Mine was still in HTML for some reason (even though it was a .vue file) and wouldn't work. Whenever I switched the language to Vue, it worked perfectly. Hope this helps someone! :)
+1 here.
Out side of <template> tag my personal snippet works ok. But I can't do it inside template tag within a .vue file
It looks like it's still not working so far. According to the docs, anything between <template></template> should have vue-html snippets available. But the snippets are behaving incorrectly:
Working correctly outside tags:

Does not work in the class tag (where it is always used for css classes):

Works outside the template:

The snippet package used can be found here (both html and vue-html languages are added in the package.json). When using the snippets in an ordinary html file, everything works fine.
@octref any thoughts on this?
It's still an issue until Jan 2024.
It's still an issue until Jan 2024.
Vetur isn't maintained anymore, you should switch to Volar.

