Closed vimtoe closed 9 months ago
To find out what highlight group to edit ...
:Inspect
Treesitter
- @comment.lua links to Comment lua
- @spell.lua links to @spell lua
- @comment.documentation.lua links to Comment lua
- @spell.comment links to @spell comment
- @spell.comment links to @spell comment
- @text.uri.comment links to @text.uri comment
- @nospell.comment links to @nospell comment
The stuff within "Treesitter" and ending in ".comment" are all possible highlight targets that you can set.
For example
Change @text.uri.comment
vim.api.nvim_set_hl(0, "@text.uri", {bg="#333333"}) -- More general
-- or
vim.api.nvim_set_hl(0, "@text.uri.comment", {bg="#333333"}) -- More specific
The highlights are hierarchical. So changing "@text.uri"
will also be inherited by "@text.uri.comment"
For more details check out :help nvim_set_hl()
apologies for not responding sooner! allow me to close this, you suggestions above worked perfectly! and thank you for your work.
hi, first - thanks! forgive me for this is not really an "issue" as I am sure it is already achievable,. I understand that treesitter queries can be modified fairly easily, for highlighting its
/after/queries/$LANGUAGE/highlights.scm
, in this case, would$LANGUAGE
becomment
? and if its not too much to ask (as Im a noob and others may benefit from it), could you possibly either post an example here or add it to theREADME
for changing the available highlights provided please? thank you once again for a great parser!