vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 593 forks source link

*.vue files Emmet isnt work! #44

Closed duleigiser closed 7 years ago

duleigiser commented 7 years ago

In template tag, Emmet syntax is not available.sucks!

cupools commented 7 years ago

Add the following to your setting and it works for template, but not stylesheet.

"emmet.syntaxProfiles": {
  "vue": "html"
},
huanguolin commented 7 years ago

Me too when i update to 0.3.3. So i rollback to 0.3.2.

octref commented 7 years ago

This is fixed in 0.3.5. Try update.

Basically, region between <template> is now marked as vue-html instead of html to provide better support for vue's interpolation and directives.

You need to add this to your setting:

"emmet.syntaxProfiles": {
  "vue-html": "html"
}

vetur

duleigiser commented 7 years ago

it works!thanks~

murat commented 7 years ago

Hi @octref :hand: , I did it.

It works for emmet but does not working vue snippets at this time. Is there any solution for use vue snippets + emmet features both?

image

Edit: I'm using a scaffold snippet for now.

    // user snippets/html.json
    "Vuejs scaffold": {
        "prefix": "scaffold",
        "body": [
            "<template>",
                "\t<div id=\"\">",
                "",
                "\t</div>",
            "</template>",
            "",
            "<script>",
                "\texport default{",
                    "\t\tname: '',",
                    "",
                "\t};",
            "</script>",
            "",
            "<style lang=\"scss\">",
            "",
            "</style>"
        ],
        "description": "Create vuejs scaffold"
    },
octref commented 7 years ago

If you are using "emmet.useNewEmmet", it's not supported in vetur yet but probably will be next month.

octref commented 7 years ago

You can subscribe to https://github.com/Microsoft/vscode/issues/29114

murat commented 7 years ago

I don't know what features are included new emmet. But I did set "emmet.useNewEmmet" as false and it works now. Thank you @octref God bless you. :smile: