Open mjbvz opened 6 years ago
This already works in VS Code if you change the document language to jsx/tsx, or if you set:
"emmet.includeLanguages": {
"typescript": "html",
"javascript": "html"
}
I use both react and lit-html in VSCode, there is a way to make "html" surpass "javascripreact" inside the tagged string?
As i type .my-class
it turns into <div className="my-class">
, there is any "language id" to the tagged string?
Or the only way is defining a config for each workspace?
verified @mjbvz's solution. It works out of the box once your have those settings. Thanks !
Setting
"emmet.includeLanguages":
"typescript": "html"
}
does make emmet work in HTML templates in Typescript files. However my user-defined snippets for Typescript will no longer work (i.e. snippets defined in "Configure user snippets" => "typescript.json" will simply not show up in code completion).
Does anyone know how to make emmet work and still have access to your snippets?
Add support for using emmet abbreviations inside lit-html templates
Should probably use https://www.npmjs.com/package/vscode-emmet-helper