nvimdev / galaxyline.nvim

neovim statusline plugin written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automating colors from current colorscheme

serhez opened this issue · 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 :)

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'

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?

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.