Support tree-sitter-markdown highlight groups
Closed this issue · 4 comments
MDeiml/tree-sitter-markdown is a new Markdown parser for Treesitter that (among other things) improves speed and uses Treesitter to highlight embedded code blocks.The parser is still experimental, but it's already a big improvement over traditional syntax highlighting, so it would be great to have support for it here. I asked the author on Reddit how colorschemes can support it, and they said:
They would need to add colors for the highlight groups TSTitle, TSLiteral, TSEmphasis, TSStrong, TSURI, TSTextReference, TSPunctSpecial and TSStringEscape.
For reference, this commit shows how Catpuccin implemented support.
Thanks for letting me know and for the extra details! This looks really nice, I really like the highlighting in code blocks. These groups already exist so I think it looks decent now but I added some colors for TSStrong
and TSEmphasis
, what do you think:
I also might go back and revise the regex based markdown groups since some of them seem to overlap.
Looks great! I should have been more specific about what seemed to be missing, and bold / italic colors make a big difference. I also wonder if a different color for link titles would help. Here's a couple of links with Treesitter:
And without:
The latter seems a bit easier to parse, but what do you think?
Looks great as-is IMO!