rebelot/heirline.nvim

Gruvbox

Closed this issue · 11 comments

How do I set the correct gruvbox theme?
I chose the dark gruvbox theme but heirline is showing a light version

Screenshot 2023-03-15 at 16 02 10

It looks like this now, and I have to much ocd to live with this

See the color section of the cookbook. You should pick the colors from the highlights you like

@rebelot But why isn't it following the gruvbox dark theme?

How can I help you if I don't know:

  1. how you set up your colors
  2. what colorscheme you are using (the actual repo implementing gruvbox)

The general rule of thumb is:

  1. load your colorscheme :colo gruvboxwhatever before heirline
  2. in heirline config, use utils.get_highlight to get the colors from highlight groups defined by your colorscheme

I am using astronvim and as far as I know I didn't change any color settings exept:
colorscheme = "gruvbox", the full setting are available on my dotfiles repo.
I'm using "ellisonleao/gruvbox.nvim", as colorscheme.

I am not dissecting your dotfiles man... if you are using default config for astronvim statusline, consider opening an issue there.

I don't expect you to do that. Is there otherwise a way to force heirline to darkmode? @rebelot I did also open a question on their discord. But didn't get an answer yet

dear @saladuit, there's no such setting in heirline, all colors are explicitly defined for each component. AstroNvim uses heirline as a backend to format the statusline and comes with a heavy pre-configuration. I have absolutely no idea how AstroNvim wraps around heirline to provide users a somewhat simpler api. You should dive into the docs of astronvim and gruvbox and see if you can pinpoint the issue. here's a few pointers:

  1. make sure that your colorscheme is loaded before everything else, also be aware of the 'background' option. Try unsetting it or setting it to dark before loading the colorscheme.
  2. check your heirline config, or the options provided by astronvim, is there some option to load the colors? If so, provide your own colors. Astronvim has its own utility to get the rgb colors from a definded hlgroup.
  3. do other colorschemes work nicer?

Thank you very much for your extra explanation! I will share your post as well in the Astronvim community! @rebelot

bigzhu commented

I have run into the same issue that you described.
@saladuit Have you found a solution to this issue yet?

For anyone running into this, gruvbox-baby works well out of the box.