Open giniedp opened 6 years ago
there is actually a plugin for that purpose https://github.com/boyswan/vscode-glsl-literal but it currently supports only js files
Let me add, VSCode currently lets handles JS inside <script>
tags as well as ``` js
code areas inside markdown. It would be great if somehow this plugin could do the same for <script type="glsl">
(or user specified types) as well as markdown areas.
in ES 2015 there is a concept of template literals. More about that here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_template_literals
In short: we can write something like this in js/ts
where
glsl
is a tagged templateI would love to see syntax highlighting enabled for tagged templates like
glsl
andhlsl
inside js/ts files. This is only about syntax highlighting, there is no need to provide these template functions.Here is an example extension that does exactly that but with html templates
https://github.com/mjbvz/vscode-lit-html