I’m working on kak-tree-sitter and the software is mature enough to start vendoring queries and grammars. I hit a problem with markdown and especially markdown.inline injection. It looks like the injection mechanism doesn’t fully work (I’m using tree-sitter-highlight).
This is the buffer highlighted via markdown:
And here is the same buffer explicitly highlighted with markdown.inline:
For the record, injection works in other language such as comment in rust:
Is there anything else I’m missing? The way I’m highlighting a Markdown document is to simply highlight it with markdown and letting the injection callback eventually highlight with markdown.inline, but it looks like there’s more to it?
Sorry, I fixed it. I’m using Helix’ injections.scm query, which is using include-unnamed-children, which is not supported by tree-sitter-highlight (probably something specific to their code.
Describe the bug
I’m working on kak-tree-sitter and the software is mature enough to start vendoring queries and grammars. I hit a problem with
markdown
and especiallymarkdown.inline
injection. It looks like the injection mechanism doesn’t fully work (I’m usingtree-sitter-highlight
).This is the buffer highlighted via![image](https://github.com/MDeiml/tree-sitter-markdown/assets/506592/a126730c-b33a-4a36-9cc9-975774bfb15d)
markdown
:And here is the same buffer explicitly highlighted with![image](https://github.com/MDeiml/tree-sitter-markdown/assets/506592/a7dba011-7161-46d4-b294-a10a15538a17)
markdown.inline
:For the record, injection works in other language such as![image](https://github.com/MDeiml/tree-sitter-markdown/assets/506592/ff76039e-e1d0-4454-9d0a-bd8298a0caf5)
comment
inrust
:Is there anything else I’m missing? The way I’m highlighting a Markdown document is to simply highlight it with
markdown
and letting the injection callback eventually highlight withmarkdown.inline
, but it looks like there’s more to it?