Embedding external language #6020
Answered
by
lildude
scripthunter7
asked this question in
Q&A
-
Hello! I would like to ask is Linguist supports embedding an external language in my own syntax highlighter? I'd like to embed Javascript in our tmlanguage according to the example below:
"grammars": [
{
"language": "adblock",
"scopeName": "text.adblock",
"path": "./syntaxes/adblock.tmLanguage.json",
"embeddedLanguages": {
"source.js": "javascript"
}
}
]
{
...
"contentName": "source.js",
"patterns": [
{
"include": "source.js"
}
]
} This works in VSCode, but is there any extra TODO required to make it work in Linguist? Or is it possible at all? Although, HTML works in Linguist. |
Beta Was this translation helpful? Give feedback.
Answered by
lildude
Aug 15, 2022
Replies: 1 comment
-
There's nothing extra to do provided Linguist includes the scope you're referencing, which in this case it does. It should work as it does in VSCode. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
scripthunter7
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's nothing extra to do provided Linguist includes the scope you're referencing, which in this case it does. It should work as it does in VSCode.