Closed fabiodcorreia closed 1 year ago
lightbg
is commented.
lightbg
is commented.
It's not used by the vscode_colored theme that I use. Anyway I tried with that uncommented and the result is the same.
Found yesterday on Discord. The culprit is here:
I changed my local copy and I think this fix the problem but I don't if it's the best solution since I don't know much about lua.
local light_grey = colors.light_grey
local statusline_bg = colors.statusline_bg
if statusline_theme == "vscode" then
statusline_bg = generate_color(colors.statusline_bg, 1)
light_grey = generate_color(colors.light_grey, 20)
elseif statusline_theme == "vscode_colored" then
statusline_bg = generate_color(colors.statusline_bg, 1)
light_grey = generate_color(colors.light_grey, 25)
end
So I created 2 local variables to hold the lighter version of the color instead of setting it on the colors variable. After that I replace all the call of colors.statusline_bg and colors.light_grey with the local variable. I tried several times and replicate the issue but I can't reproduce it anymore.
I still have the problem even after the fix.
I use the one_light
theme and the vscode_colored
statusline. After toggling the theme back and forth, the file name and git brand don't change its color back to the light theme.
It is fixed for the tabs though.
@fabiodcorreia
@siduck I think the issue is with the themes, for example the issue appears for onedark and one_light but for everforest and everforest_light it works fine, GitHub Light and Dark also doesn't work but Grovbox looks good.
I created 2 themes under custom/themes/ as described on the documentation (catppuccin_frappe.lua and catppuccin_latte.lua) and I set both on chadrc.lua. And it works fine.
One thing that I noticed is that if toggle the theme from light to dark and back again to light some of the colors remain from the dark theme or get lost. For instance the status line filename and git brand and the buffer name on the tabs.
Light theme with correct colors:
After I switch to dark
Switching back to light
Switching back o dark its all good but if I switch back to light again now the colors are the ones from dark theme.
After this points I can toggle as many times as I want and the result is always wrong. I need to exit nvim open again a toggle the themes one to fix.
For some reason this only happens on the light theme, the dark is always good regardless how many combinations I do.
The themes can be found at the following links: