-
-
Notifications
You must be signed in to change notification settings - Fork 107
Conversation
Thanks for the PR, I'll test out zenburn soon and see how this effects other colorschemes. Possible solutions off the top of my head are
|
I think safe combinations of colors that should work on most colorschemes are: bg + (normal fg, any of the other TS fgs), statusline bg + statusline fg, and statuslinenc bg + statuslinenc fg. I like the idea for setting a statusline theme (in this case it'll generate those 3 colors based on that particular theme, right?) Although one thing I notice about
So perhaps all that doom-nvim should do here is detect that and swap bg/fg to get things working? It only copies the bg/fg color of the StatusLine, but not its attributes (like bold, reverse), etc. |
I use these colorthemes:
You can find the colorschemes I used in the old 3.x doom-nvim config of mine: https://github.com/edwintorok/doom-nvim/blob/local/colors/zenburnish_hc.vim (generated from https://github.com/edwintorok/doom-nvim/blob/local/shipwright_build.lua) Note that using HSV(or HSL) to deal with colorschemes is somewhat "deprecated" these days, even though it is what theme generators like lush.nvim use: OKLab/OKLCh is a lot better and mostly compatible with code that deals with 3 color coordinates in terms of hue, lightness and chroma: https://bottosson.github.io/posts/oklab/ If you intend to work on this can you try whether detecting the 'gui=reverse' works? Might be a simpler fix than refactoring the whole colorscheme code :) |
Some colorschemes (e.g. Zenburn) get a reverse attribute in the StatusLine highlights. Detect this and swap foreground/background. Signed-off-by: Edwin Török <edwin@etorok.net>
Meanwhile I've tried detecting the 'reverse' attribute, seems to work fine so far for StatusLine (and in fact I've done the detection in P.S.: the refactor you mentioned is probably a good idea anyway, perhaps as a followup to this, thanks for offering to do it |
I pushed the fixes to improve compatibility with non treesitter themes. Could you test it out and see if that fixes your issue as well? |
Thanks, this works great! |
…vim#381) Some colorschemes (e.g. Zenburn) get a reverse attribute in the StatusLine highlights. Detect this and swap foreground/background. Signed-off-by: Edwin Török <edwin@etorok.net>
Some colorschemes (e.g. Zenburn) have a light foreground for the
statusline, and most of the special* colors are light too, resulting in
very low contrast.
In such a case swap statusline background/foreground colors.
This makes
ZenBurn
theme's statusline readable, even though it doesn't use the statusline colors the theme intended.This is more of a workaround, but works for me so far.
Perhaps a better way would be to avoid using so many other colors that were not intended for the statusline and instead try to just tweak the bold/etc. attributes? What do you think?
FWIW with the previous version of Doom the statusline worked without needing to tweak colors.