rmehri01/onenord.nvim

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:

Screen Shot 2021-12-15 at 10 00 26 PM

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:

Screen Shot 2021-12-16 at 12 56 15 PM

And without:

Screen Shot 2021-12-16 at 12 58 10 PM

The latter seems a bit easier to parse, but what do you think?

Ah I see, yeah I like the cyan more! Do you have any other suggestions for the markdown colors, either with or without Treesitter? I just have those 3 changes so far:

Screen Shot 2021-12-16 at 10 12 34 AM

Looks great as-is IMO!