Closed ValdezFOmar closed 3 months ago
After searching among this and other colorschemes, I'm sure that this appearance is caused by:
@character.special
=> SpecialCharacter
=> Special
@string.special.path
=> Special
And it's common to link the special character like this.
Could you please provide a "expected behavior" image, so that we can decide what/how to change, as changing any of them may break some other user interface.
This is how it looks using traditional vim regex highlighting, making the glob patterns stand out:
Couldn't this be solved by linking any of the specific captures @character.special.gitignore
or @string.special.path.gitignore
to something different?
It can, but changing that might also affect the UI in some other places. This should be with further consideration I guess
According to neovim documentation this is the intended way:
As an additional rule, capture highlights can always be specialized by language, by appending the language name after an additional dot. For instance, to highlight comments differently per language:
hi @comment.c guifg=Blue hi @comment.lua guifg=DarkBlue hi link @comment.documentation.java String
Ah, I just found that I misread your advice here 😉
Couldn't this be solved by linking any of the specific captures
@character.special.gitignore
or@string.special.path.gitignore
to something different?
This seems to be a acceptable solution, though I'm not sure if this should be implemented on upstream (nvim-treesitter) or we write custom queries
in this repo.
I don't think this is an upstream issue, nvim-treesitter only provides the queries, its the colorscheme responsibility to give them a useful color. I don't think queries are necessary either, just doing something like ["@string.special.path.gitignore"] = { whatever }
would be enough.
Description
A recent commit in nvim-treesitter change the highlighting for wildcards and characters in .gitignore. The new captures link to the same
Special
group in catppuccin, which makes wildcards hard to distinguish:Neovim version
Terminal and multiplexer
kitty 0.35.2
Catppuccin version / branch / rev
main
Steps to reproduce
nvim -u repro.lua
Example .gitignore:
Expected behavior
Wildcards should stand out from the file/directory names.
Actual behavior
Almost everything is the same color and makes it hard to read.
Repro