Yaml grammar not applied to derivative language #9530
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You can re-use the tree-sitter parser with |
Beta Was this translation helpful? Give feedback.
-
Hey, I can't find |
Beta Was this translation helpful? Give feedback.
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