nvimdev / galaxyline.nvim

neovim statusline plugin written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing colorscheme breaks the statusline theme inside neovim

Rellotscrewdriver opened this issue · comments

Normally, this goes in discussions's Q&A but since there's none, I asked here.

I have configured statusline to show correctly in the default theme which I frequently use(it has some inconsistenices).
but when changing to different colorscheme(not just catpuccin) inside neovim the element's background don't match the same.

I've tried changing the bg_color variable(which goes in every element's highlight) to 'Statusline' and 'WinBar' but both of them show the current colorscheme and not the statusline's theme.
So how to I make the elements highlight match the current statusline theme everytime I change the colorscheme inside neovim?

here's the code: https://github.com/Rellotscrewdriver/neovim_config/blob/master/lua/statusline.lua

here's the example:
default theme
Screenshot from 2023-04-02 10-05-08

darkblue theme from neovim(for example of changed colorscheme)
Screenshot from 2023-04-02 10-05-30

@xiaoshihou514 I used to use galaxyline until this very issue and since it's been a month of inactivity, I had to change the plugin. Although I forgot to close this issue after that.
I will close this issue if you want to reply back ;)

@Rellotscrewdriver Sorry for the misunderstanding, if you take a look at this file you can see galaxyline.theme is merely a preconfigured table of colors. If you want to adapt your colors with your colorscheme I would suggest getting colors from highlight groups(Comment, Title etc), though you would have to work out the combinations yourself :P