zenbones-theme / zenbones.nvim

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

Support changed treesitter highlight groups neovim 0.10 #175

Closed jryom closed 4 months ago

jryom commented 4 months ago

Neovim 0.10 changes treesitter highlight groups, which breaks highlighting a lot of ways.

https://neovim.io/doc/user/news-0.10.html#_-breaking-changes

https://github.com/nvim-treesitter/nvim-treesitter/commit/1ae9b0e4558fe7868f8cda2db65239cfb14836d0

https://neovim.io/doc/user/treesitter.html#treesitter-highlight-groups

mcchrish commented 4 months ago

This is already supported here https://github.com/mcchrish/zenbones.nvim/blob/453ec69d82d644ee6998a3464da49d0261df9f80/lua/zenbones/specs/dark.lua#L193-L312, correct?

jryom commented 4 months ago

Hmm, not sure. I accidentally upgraded neovim on my personal machine yesterday and just noticed that some of the highlights look pretty broken:

Screenshot 2024-05-17 at 09 41 58

I haven't dug more into it, so it might only be one highlight group that needs some adjustments.

This is how it looks on 0.9:

Screenshot 2024-05-17 at 09 43 45
mcchrish commented 4 months ago

Hmm, those looks like the colors from the new default neovim colorscheme. At least for the strings.

Seems like if you remove the vim.g.zenbones_compat = 1 it works.

jryom commented 4 months ago

Thanks for the workaround, it does indeed fix the issue. Reason I ran in compat mode was to avoid having to install the additional dependency, since I don't really care about customizing the theme.

zakj commented 4 months ago

I don't think this is entirely fixed; I can reproduce with a string in a Python file:

Screenshot 2024-05-18 at 11 05 32 AM

Looks like zenbones doesn't override the default String highlight:

https://github.com/mcchrish/zenbones.nvim/blob/453ec69d82d644ee6998a3464da49d0261df9f80/lua/zenbones/specs/dark.lua#L118