Open getninjaN opened 5 years ago
The atom package looks for template
key in objects and highlights them as mustache templates. Based on https://github.com/michaelgmcd/vscode-language-babel/issues/23, it didn't seem like this had much usage so I removed it, or else any object with a template
key would have incorrect highlighting.
Hmm... Ok. So how do I get syntax highlighting? :) Could there be a setting for this?
I could probably support the syntax highlighting with a comment, similar to /* CSS */
for some inline css. I'd love a PR as well :)
In order to support this setting, I need vscode to support adding and removing grammars at runtime: https://github.com/Microsoft/vscode/issues/61962
I just installed vscode-language-babel and encountered the same problem. But then I noticed that the CoffeeScript formatting formats templates correctly, so it seems to be possible to achieve this with the current vscode version.
Addition: I had noticed the problem of templates not beeing styled with .js files, not .es6. And I just discovered that after installing the JavaScript Atom Grammar template literals are now styled correctly with your plugin.
This grammar is provided by Microsoft and contains the following Note: Since the latest update, the JavaScript grammar shipped with VS Code now also supports colorizing of varable and function references and aims to be feature equivalent to the Atom grammar. The VS Code team therefore recommends to use the built-in JavaScript grammar. The "feature equivalency" obviously isn't as complete as advertised.
@esocode please look at https://github.com/michaelgmcd/vscode-language-babel/issues/34#issuecomment-416606321. Other highlighting plugins have explicit checks for "template" and highlight them as mustache. I would be interesting in adding custom highlighting like this in a comment but would need VSCode support
Hi! I seem to have a problem with syntax highlighting in my ES6 files, not sure if I'm missing something or not. I would love for this to work since I moved from Atom to Code, and this worked great in Atom.
Code says the language mode is
Babel JavaScript
.Any ideas what could be wrong?