Closed charbelnicolas closed 1 year ago
I'm guessing that your color scheme or something else changes it after you call nvim_set_hl()
. These sort of highlight tweaks should be performed in a :h ColorScheme
auto command callback such that they are applied after your color scheme.
Another thing to keep in mind: I've seen an anti-pattern of color schemes that use scheduling or similar to set some of their hl groups at some later time. This makes the ColorScheme
auto command much less useful, as then the color scheme might override your tweaks at some arbitrary point you have no control over. So if you're having trouble figuring out what is overriding the hl, check the source code of your color scheme.
Finally: you can always see the current values of any hl group with:
:hi DiffviewStatusUntracked
Unless the ? means something else other than untracked, I think somewhere in the plugin DiffviewStatusAdded is overriding DiffviewStatusUntracked.
If I change DiffviewStatusAdded to the color I want for the untracked, it works (but now I have pink As all over the place):
Or maybe it's just that I don't know what the untracked color is for...
Okay, my bad, I see now that I've actually mapped the untracked status to the wrong hl and just never noticed....
I'll fix it soon.
It looks like the DiffviewStatusUntracked highlight has no effect on untracked files:
colors[7]
here is supposed to be pink, not green:wal --preview
shows color 7 as pink:Am I doing something wrong here? Any help is appreciated.