EdenEast / nightfox.nvim

🦊A highly customizable theme for vim and neovim with support for lsp, treesitter and a variety of plugins.
MIT License
2.86k stars 134 forks source link

bug: Comment highlights do not work with newer versions of nvim-treesitter #410

Closed msc94 closed 5 months ago

msc94 commented 5 months ago

Neovim version (nvim -v)

0.9

Operating system/version

Linux

Describe the bug

nvim-treesitter seem to have updated their capture groups for todo, wip, notes, etc in comments here: https://github.com/nvim-treesitter/nvim-treesitter/commit/1ae9b0e4558fe7868f8cda2db65239cfb14836d0

I fixed it locally with

-- TODO: Remove when colorscheme has been updated
vim.api.nvim_set_hl(0, "@comment.todo", { link = "@text.todo" })
vim.api.nvim_set_hl(0, "@comment.note", { link = "@text.note" })
vim.api.nvim_set_hl(0, "@comment.warning", { link = "@text.warning" })
vim.api.nvim_set_hl(0, "@comment.error", { link = "@text.error" })

but it would be cool if it was in the colorscheme again. I would make a PR, but don't really know if you want to keep the old capture groups as well for backwards compatibility?

Steps To Reproduce

  1. Update nvim-treesitter to newest version
  2. Install treesitter comments parser
  3. See if TODO is highlighted in comments

Expected Behavior

TODO highlighted

Repro

No response

EdenEast commented 5 months ago

What commit are you on as this has been updated in #404.

msc94 commented 5 months ago

I'm sorry, I was having mismatched versions then. I didn't see this commit when I was analyzing the issue. Thank you for the hint.

And, thanks for your work, amazing colorscheme!