vscode-textmate
vscode-textmate copied to clipboard
`include` grammars don't load within `captures`
Embedded grammars are not loaded from disk when inside a captures rule
If the embedded grammar was pre-loaded by another include in the same grammar OR loaded via another grammar in another language in another file then it works as expected
- Don't open a file that loads the
Cgrammar - Open a file with the following grammar loaded
- notice no syntax highlighting.
test(5);
- Close the file
- Reload VSCode
- Open a
Cfile - Reopen the file with the following grammar loaded
- notice syntax highlighting now working
{
"scopeName": "source.capture.load",
"patterns": [
{
"match": ".+",
"captures": { "0": { "patterns": [ { "include": "source.c" } ] } }
}
]
}
from my testing getExternalGrammar() is never run when directly inside captures
related:
- https://github.com/microsoft/vscode-textmate/issues/141
- https://github.com/microsoft/vscode-textmate/issues/173
- https://github.com/microsoft/vscode-textmate/issues/174