emmet.includeLanguages for one to many mapping
See original GitHub issueHow can I enable several languages for a given file extension please?
For example
"emmet.includeLanguages": {
"tt": ["html", "css", "javascript"],
}
Except this doesn’t work. I tried with multiple references to the key
"emmet.includeLanguages": {
"tt": "html",
"tt": "css",
"tt": "javascript",
}
and also with an embedded object
"emmet.includeLanguages": {
"tt": {
"html":"html",
"css": "css",
"javascript": "javascript",
}
no joy 😦
"emmet.includeLanguages": {
"erb": "html"
}
_Originally posted by @abnersajr in https://github.com/Microsoft/vscode/issues/9500#issuecomment-339634819_
Issue Analytics
- State:
- Created 5 years ago
- Reactions:17
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Emmet in Visual Studio Code
Show Emmet suggestions in all Emmet supported modes as well as the languages that have a mapping in the emmet.includeLanguages setting. Note: In...
Read more >Using Emmet feature for html, css within php file in Visual ...
The only thing is that emmet.includeLanguages doesn't support one to many mapping yet, so you can map to only one entity, either html...
Read more >VS Code tips — Enable emmet abbreviations in any language ...
Like using Emmet abbreviations in VS Code for html or css? You can enable them in other languages with " emmet. includeLanguages "...
Read more >Can VS Code Do Emmet? - CSS-Tricks
Map a keyboard shortcut to the “Wrap With Abbreviation” command. This makes it super quick to create things like anchors. Emmet In Other...
Read more >Auto-Format HTML Templates in Django with VSCode
Using the Open Weather Map API with Python ... We will start with a basic pipeline template as provided by gitlab.com:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 for this feature. Please add it 👍
Use case:
I’m using an HTML-templates to create my HTML elements inside javascript. I use an extension for syntax highlighting which works perfectly. However, Emmet does not work in that file. Only if I add
emmet.includeLanguages
it will work. But as the limit of language mappings is 1. I can only mapHTML
orCSS
to that JS file. However, I write both,HTML
andCSS
in that single file.I’m sure we are not the only 2.
Thank you!
We’d also like this to be possible.
A concrete use case for this feature:
.js
files (which is suggested in the React documentation and plays nicer with the Chromium Dev Tools in Electron)styled-components
, also in.js
filesWith this setup, we must either choose between Emmet in JSX (in our components’ render functions) or Emmet in CSS (in our styled-components’ template strings).
As a side-note it would be nice if Emmet could be configured not just per file type but also separately for template strings as those often embed other languages in JS. Specifying that Emmet’s CSS (or whatever syntax) support should be enabled in template strings only would be more granular than “everywhere in JS” and cover most use cases, I think.