Repository is not illegal here.
SSlinky opened this issue · comments
Sam commented
Sam commented
Sam commented
foo: name: some.scope.lang begin: "(?i)([a-z][a-z0-9_]*)\\s*\\(" end: "\\)" patterns: - include: "#baz" - include: "#bar" repository: ...
Original is incorrect. For some reason, repository is not a supported key when the rule contains begin/end matches. The second comment stands. It is supported with no matches (just patterns, as above) and with a single match rule. e.g.
foo:
name: source.foo
match: "If.*"
captures:
0:
patterns:
- include: "#bar"
repository:
bar:
name: source.bar
Peter Hull commented
I tried this on the current development version of vscode-tmlanguage (i.e. not the one on the marketplace) which contains the fix for #12, on a file foo.tmLanguage.yaml
containing just this:
foo:
name: source.foo
match: "If.*"
captures:
0:
patterns:
- include: "#bar"
repository:
bar:
name: source.bar
The result is:
I think this is OK? Can you point me to another file where it's not working?
Thanks!