Vetur: Emmet not working in pug template

Created on 7 Nov 2018  路  8Comments  路  Source: vuejs/vetur

  • [ x ] I have searched through existing issues
  • [ x ] I have read through docs
  • [ x ] I have read FAQ

Info

  • Platform: Windows 10 1809
  • Vetur version: 0.13.0
  • VS Code version: 1.28.2

Problem

Emmet was broken in template when using pug, It working again after switch to html language.

image

image

Reproducible Case

New install of VSCode.
Install Vetur.
Emmet will not work within template tags of .vue file when using pug.

feature-request emmet

Most helpful comment

I found a workaround method, add these to settings.json :

"emmet.includeLanguages": {
        "vue": "jade"
},

It will add Emmet support to *.vue file, but will add Emmet in global vue file, not just template tag only.

All 8 comments

I found a workaround method, add these to settings.json :

"emmet.includeLanguages": {
        "vue": "jade"
},

It will add Emmet support to *.vue file, but will add Emmet in global vue file, not just template tag only.

I never realized it's possible to use emmet with bug. This is a fair feature request.

Please forgive my unobservant. I didn't read through doc. Is that possible to support pug in *.vue file?

@nereuseng For now you only get syntax highlighting, but nothing else.

@octref Is this part of the 1.0 roadmap?

@octref

I think this is available now.

I had the same problem. Here is a working solution that solved this problem for me:
"emmet.includeLanguages": { "jade": "html" },

So is there a way to enable emmet for .vue files? @wolfter12 advice doesn't work for me and assigning jade to entirety of .vue is too much.

Was this page helpful?
0 / 5 - 0 ratings