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
C grammar
- Open a file with the following grammar loaded
- notice no syntax highlighting.
test(5);

- Close the file
- Reload VSCode
- Open a
C file
- 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:
Embedded grammars are not loaded from disk when inside a
capturesruleIf 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
Cgrammartest(5);Cfile{ "scopeName": "source.capture.load", "patterns": [ { "match": ".+", "captures": { "0": { "patterns": [ { "include": "source.c" } ] } } } ] }from my testing
getExternalGrammar()is never run when directly insidecapturesrelated: