emmetio / codemirror6-plugin

WIP Plugin for CodeMirror 6
40 stars 7 forks source link

Markup Snippets not working in Vue #25

Closed shshaw closed 1 month ago

shshaw commented 6 months ago

CSS snippets seem to be working in Vue, but Markup snippets don't. Am I missing something or is this a bug?

https://github.com/emmetio/codemirror6-plugin/assets/777155/5089dae5-6260-4bcf-acb2-abfd2eb55b6d

shshaw commented 6 months ago

Regular expansions div*5 seem to work, but not custom markup snippets.

Screenshot 2024-03-14 at 11 48 26 AM
sergeche commented 6 months ago

Will check this out. Do you use standard Vue syntax highlighter?

shshaw commented 6 months ago

I'm using the official @codemirror/lang-vue as loaded from @codemirror/language-data: https://github.com/codemirror/language-data/blob/main/src/language-data.ts#L995-L1001

sergeche commented 1 month ago

Can you provide Emmet config you use for Vue editor? Seems to work fine for me

shshaw commented 1 month ago

Confirmed that snippets seem to be working now.

This may have been a problem with an improperly escaped snippet causing the markdown snippets to not work. The snippet was just text words with spaces without any quotes or escaping, which seemed to make all the snippets not work. I'm looking to add some validation/protection around this. That may be a problem with our snippet setup code, not Emmet, but let me know if you have any guidance on that.

Thanks for checking 👍