Open amozoss opened 3 years ago
Also bumping into this, but new to emmet so might be missing something obvious.
The emmet docs talk about how you can pass variables through like so:
html:5[lang=ru]
—> <!doctype html>\n<html lang="${lang}">...</body>\n</html>
But that example which is supposed to work out of the box, doesn't work (if you pass a variable override it keeps the old default of en
), so custom snippets passing variables in a similar way definitely won't (as far as I understand).
It seems that passing variables in snippets hasn't been added to emmet-vim
yet from what I can tell.
https://docs.emmet.io/customization/snippets/#variables
I'd like to be able to override shorthands such as
#
and.
by using${class}
or${id}
.The end goal being I'd be able to type something like for jss in jsx.
Example usage:
div.foo
Becomes:<div className={classes.foo}>
Is this already implemented? It doesn't seem to work. I've found where the cursor is parsed. What would be a good way to implement the above?