zenbones-theme / zenbones.nvim

🪨 A collection of contrast-based Vim/Neovim colorschemes
MIT License
682 stars 48 forks source link

Markdown Treesitter Groups #64

Closed evantravers closed 2 years ago

evantravers commented 2 years ago

Finishes #63

evantravers commented 2 years ago

image

image

mcchrish commented 2 years ago

Any idea why there are some underlined words in the code blocks? It seems the spellchecker is activated in those areas.

Screen Shot 2021-12-17 at 3 52 32 PM

EDIT: Looks like a limitation in nvim-treesitter: https://github.com/nvim-treesitter/nvim-treesitter/issues/698

mcchrish commented 2 years ago

I actually like how the non-treesitter handles links where the link text is underlined while the URI is highlighted with less contrast i.e. linked to Number.

With TS:

Screen Shot 2021-12-17 at 4 05 30 PM

Without TS:

Screen Shot 2021-12-17 at 4 05 01 PM

Is it possible to do this in TS? According to TS playground, there is no highlight group applied to the link text. We might need to patch this upstream.

evantravers commented 2 years ago

I agree whole heartedly, and am excited that your change to tree-sitter was approved so fast.

evantravers commented 2 years ago

I have not seen reference to these markdown treesitter groups like markdownTSLiteral… are you telling me to change my PR to something that exists or are you wishing something existed so that I could change my PR?

mcchrish commented 2 years ago

Tree-sitter creates specific versions of the groups per language and are linked to the general group. e.g. vimTSLiteral, javascriptTSLiteral, markdownTSLiteral and so on. This quite useful when we want to only target specific highlights of a language. You can see these groups when running :highlight.

My request is that we target these markdown specific groups instead. We have to create new groups for this. Example:

markdownTSLiteral { Delimiter };
evantravers commented 2 years ago

Thanks for the explanation… I was confused that there was literally no mention of markdownTSLiteral anywhere on github.

I'll make those changes and ping you again later this weekend.

evantravers commented 2 years ago

Ok… pulled out the original group additions/changes, made a markdown specific group, added to both files.

I don't love the revert (looks ugly in git history)… so when we approve the changes I'll squash and rebase before merge. Thoughts?

mcchrish commented 2 years ago

This looks great! One last thing I want to request is the link styling I mentioned here: https://github.com/mcchrish/zenbones.nvim/pull/64#issuecomment-996518952

evantravers commented 2 years ago

image image

After changes.

evantravers commented 2 years ago

git reset --soft for a cleaned up commit. Same changes.

mcchrish commented 2 years ago

Thanks for the contribution! 🚀