It would be nice to be able to get the same code completion and syntax highlighting using a vtl
tag on a template string like so:
I know this extension is for code completion only, but I'm assuming it uses the "velocity" language token / reference from another extension to be activated. Is it true?
I'm wondering what minimal work could be done in order to "enable" the language inside the string literal so both extensions would work.
"contributions": {
...
"grammar" : {
"injectTo": [
"source.js",
"source.ts",
],
"scopeName": "inline.velocity",
"path": "./syntaxes/velocity.inline.json",
"embeddedLanguages": {
"meta.embedded.block.velocity": "velocity"
}
}
...
{
"fileTypes": ["js", "ts"],
"injectionSelector": "L:source -string -comment",
"patterns": [
{
"name": "taggedTemplates",
"contentName": "meta.embedded.block.velocity",
"begin": "(`)(velocity|vtl)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.string.template.begin.js"
},
"2": {
"name": "comment.line.velocity.js"
}
},
"end": "`",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.template.end.js"
}
},
"patterns": [
{ "include": "source.velocity" }
]
}
],
"scopeName": "inline.velocity"
}