galaxyline.nvim icon indicating copy to clipboard operation
galaxyline.nvim copied to clipboard

Automating colors from current colorscheme

Open serhez opened this issue 3 years ago • 3 comments

I'd like to automatically theme galaxyline using the colors from the colorscheme I'm using at any given time. I thought about doing this by setting up the galaxyline config for each component's highlight using some n/vim variable which holds the highlight groups and their color, but I can't find such a variable (I'm looking for something like e.g.: "vim.g.theme.colors.bg").

Is there any such way of doing this?

Thanks :)

serhez avatar Jun 07 '21 13:06 serhez

I'm not sure if this is what you mean, but you can pass highlight groups to a component as a string, like:

highlight = 'StatusLine'

ebobrow avatar Jun 12 '21 13:06 ebobrow

I'm not sure if this is what you mean, but you can pass highlight groups to a component as a string, like:

This is indeed possible, thanks! However, ideally it would be nice to have some sort of themes like lualine has. At the moment, I think the best option unfortunately is to manually define the colors for the colorscheme you are using (and script it somehow to change dynamically along with your colorscheme).

Would automatic themes taken from your colorscheme be possible, as in lualine?

serhez avatar Jun 13 '21 16:06 serhez

Hey, I forked galaxyline very recently and added this feature (I'm hoping to PR upstream when glepnir is free), you can use my fork in the meanwhile if you want.

There's also documentation about themes if you want to take a look and create your own colors.

NTBBloodbath avatar Sep 17 '21 12:09 NTBBloodbath