Yaml grammar not applied to derivative language #9530
Answered
by
the-mikedavis
Ultra-Code
asked this question in
Troubleshooting
-
Beta Was this translation helpful? Give feedback.
Answered by
the-mikedavis
Feb 4, 2024
Replies: 2 comments 3 replies
-
You can re-use the tree-sitter parser with |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Ultra-Code
-
Hey, I can't find |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can re-use the tree-sitter parser with
grammar = "<existing grammar>"
but you also need to define queries for the new language underruntime/queries/docker-compose/
. You can re-use the queries from yaml by using; inherits: yaml
. For example see racket's queries https://github.com/helix-editor/helix/blob/master/runtime/queries/racket/highlights.scm