ronnidc / vscode-nunjucks

Nunjucks for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ronnidc.nunjucks
64 stars 18 forks source link

Emmet is not working with nunjucks files #7

Open jitendravyas opened 7 years ago

ronnidc commented 7 years ago

No generally there are issues with intellisense issue#3

jitendravyas commented 7 years ago

I wanted to say that Emmet is working with nunjucks files

chenyuncai commented 6 years ago

VSC update the emmet to v2.0. U can check it in

https://code.visualstudio.com/blogs/2017/08/07/emmet-2.0#_other-changes

it works fine now

afalchi82 commented 6 years ago

Hi, not working for me. Have I got to install something to make it work?

wangguohao commented 6 years ago

it works vscode issues 1689

// settings.json
"emmet.includeLanguages": {
    "nunjucks": "html"
 }
rbfonbuena commented 5 years ago

it works vscode issues 1689

// settings.json
"emmet.includeLanguages": {
    "nunjucks": "html"
 }

will this work regardless of file extension? i.e. *.njk

emmiep commented 5 years ago

it works vscode issues 1689

// settings.json
"emmet.includeLanguages": {
    "nunjucks": "html"
 }

will this work regardless of file extension? i.e. *.njk

It seems to me that the value html refers to the language emmet will autocomplete (HTML as opposed to CSS), not the extension of the file itself.

jonsoa commented 5 years ago

it works vscode issues 1689

// settings.json
"emmet.includeLanguages": {
    "nunjucks": "html"
 }

It worked for me, thank you!

ZJL-CFPL commented 5 years ago

// settings.json "emmet.includeLanguages": { "nunjucks": "html" }

It worked for me,thanks

ChristianBetts commented 5 years ago

Any tips on getting this to work in Atom?

Thanks

MrLechu commented 5 years ago

For me

...
"njk": "html"
...

instead

...
"nunjucks": "html"
...
haikyuu commented 3 years ago

The above command works provided you have the correct keybinding for Emmet expand. I had to press CMD+e to expand.

Tip: open the command palette CMD+P and search for Emmet expand to see the associated keys

perhenrikgithub commented 2 years ago

I tried both "nunjucks": "html" and "njk": "html" and neither worked.

But in in the bottom right corner of vs code (blue menu) there is an option change 'language mode' from "plain text" to "HTML" this seemed to do the trick.

(you could also do this in the normal setting (not the actual JSON file) if you search for "emmet")

hybridx commented 2 years ago

If you are using UI just add it in the list or if you are using json https://github.com/ronnidc/vscode-nunjucks/issues/7#issuecomment-379519584 would be useful

Screenshot 2021-10-11 at 8 16 34 PM

murtuzaalisurti commented 2 years ago

I tried both "nunjucks": "html" and "njk": "html" and neither worked.

But in in the bottom right corner of vs code (blue menu) there is an option change 'language mode' from "plain text" to "HTML" this seemed to do the trick.

(you could also do this in the normal setting (not the actual JSON file) if you search for "emmet")

Thanks! This worked for me!!

deiondz commented 2 years ago

Thank you lad! Worked like a champ!

wjoliver commented 1 year ago

Adding a file association worked for me: "files.associations": { "*.njk": "html" },

diamondalexander commented 3 months ago

I tried both "nunjucks": "html" and "njk": "html" and neither worked.

But in in the bottom right corner of vs code (blue menu) there is an option change 'language mode' from "plain text" to "HTML" this seemed to do the trick.

(you could also do this in the normal setting (not the actual JSON file) if you search for "emmet")

THIS! lol I could not figure out what the issue was but once I switched it to HTML, the settings.json code worked. I selected "Configure file association for '.njk'" so I wouldn't have to keep changing this each time.

bigbass11 commented 1 week ago

Adding a file association worked for me: "files.associations": { "*.njk": "html" },

This was the only way that worked for me for some reason...