emmet-docs icon indicating copy to clipboard operation
emmet-docs copied to clipboard

How do you get Emmet to return the right comment type?

Open djmtype opened this issue 5 years ago • 1 comments

In VS Code, I have Emmet automatically add comments.

"emmet.syntaxProfiles": {
    "html": {
        "filters": "html, c"
    }
}

That's great for HTML comments. But, what if you're using Blade or Nunjucks? You still want to use Emmet's automated comments with these languages, but the comments are different.

Blade: {{-- --}}

Nunjucks: {# #}

How do you make Emmet smart enough to realize context?

djmtype avatar Oct 15 '20 21:10 djmtype

Something like this doesn't work BTW:

"emmet.preferences": {
  "html": {
    "filter.commentAfter": "<!-- /[#ID][.CLASS] -->",
  },
  "njk": {
    "filter.commentAfter": "{# /[#ID][.CLASS] #}",
  }
}

djmtype avatar Oct 15 '20 21:10 djmtype