vscode-liquid icon indicating copy to clipboard operation
vscode-liquid copied to clipboard

Emmet shortcuts not working in HTML

Open davidwarrington opened this issue 1 year ago • 4 comments

I can't use emmet shortcuts to generate HTML. For example previously I could type .my-element and then press tab to generate

<div class="my-element"></div>

This still works inside .html files so I'm assuming the 3.* update is the cause.

davidwarrington avatar Oct 07 '22 10:10 davidwarrington

You'll need to associate this in workspace:

{
  "emmet.includeLanguages": {
    "liquid": "html"
  }
}

We can infer these settings automatically in the defaults, do you think it would be better to do this?

panoply avatar Oct 07 '22 15:10 panoply

That worked a charm, cheers! It's been such a long time since I've had to do that for anything.

I think it would be sensible to make a default as I'm unaware of any contexts where you'd use Liquid outside of HTML. That being said I don't know how many people actually use emmet abbreviations. If not a default perhaps a note could be added to the extension docs, as I'd guess this won't be the last time you're asked about this.

davidwarrington avatar Oct 07 '22 17:10 davidwarrington

Good point. I'll add it in v3.1.0 to defaults.

panoply avatar Oct 07 '22 17:10 panoply

Alright, co-authored this one and it will be available on the default. Included Liquid CSS and Liquid SCSS snippets. Following extensions will automatically have emmet available:

  • .liquid
  • .css.liquid
  • .scss.liquid

panoply avatar Oct 07 '22 17:10 panoply

Shipped https://github.com/panoply/vscode-liquid/pull/110

panoply avatar Oct 25 '22 04:10 panoply