tree-sitter-grammars / tree-sitter-markdown

Markdown grammar for tree-sitter
MIT License
375 stars 45 forks source link

Is inline injection broken? #101

Closed hadronized closed 1 year ago

hadronized commented 1 year ago

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 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: image

And here is the same buffer explicitly highlighted with markdown.inline: image

For the record, injection works in other language such as comment in rust: image

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?

hadronized commented 1 year ago

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.

Closing.