zikaari / monaco-textmate

MIT License
81 stars 10 forks source link

Grammar rules with a direct `include` not supported #13

Open SimonCockx opened 1 month ago

SimonCockx commented 1 month ago

The following works in VS Code, but does not work in Monaco.

repository:
  ruleA:
    include: '#ruleB'
  ruleB:
    match: '[a-zA-Z]+'

Note that ruleA directly includes ruleB.

Current workaround:

repository:
  ruleA:
    patterns:
    - include: '#ruleB'
  ruleB:
    match: '[a-zA-Z]+'