Closed Shatur closed 3 years ago
Yeah automatic does not work great on all themes... which is kind of expected since it's automatic and it's a guessing game. Not all vim colorschemes follow the same schema and I cannot think of a solution to make it better without coming up with a complicated algorithm (which would probably affect startup time by a lot)
@Shatur95 zephyr supports lightline you can run lightline2lualineconverter and make a pr to add the theme to lightline . It's really easy to do :)
Edit: zephyr doesn't support lightline/airline :O . The link on the issue was to vim-code-dark . And I went there and didn't check the name lol . Technicaly since they haven't provided a statusline intrigration .How statusline should look in zephyr should look is undefined .
Also I thought codedark was same as vim-code-dark. Is it a different colorscheme ?
I just looked at the previous pr for codedark and it's from you who am I telling :P
Edit: zephyr doesn't support lightline/airline :O . The link on the issue was to vim-code-dark . And I went there and didn't check the name lol .
Sorry, typo :)
I just looked at the previous pr for codedark and it's from you who am I telling :P
Yes, I already sent a colorscheme for vim-code-dark, just decided to clarify if current auto
behavior is okay :)
At the moment, the feature never worked correctly for me for themes I tried (I've also tried other threads before, but can't remember their names).
At the moment, the feature never worked correctly for me for themes I tried (I've also tried other threads before, but can't remember their names).
@Shatur95 How do you define if it worked correctly or not ? Knowing this might help make it better.
@Shatur95 How do you define if it worked correctly or not ? Knowing this might help make it better.
Colors are not suitable. For example, in my first screenshot gray color even not present in zephyr theme.
Humm . lualine_c section probably should be close to Normal . We are curently trusting StatusLine hightlight group to be something close . Though in this case It's wildly different .
Maybe try changing StatusLine -> Normal here And see if it improves colors for zephyr and other colorscheme :)
Nope we probably should just swap back1 and back2
Nope we probably should just swap back1 and back2
Looks much better, but probably gray color should be removed from here:
If I use Normal
for back2
it looks just great.
Can I adjust this highlighting group manually in my config?
You can change the highlight group . If you don't want to do that you can also tweek lualine themes as part of lualine config like following .
local my_theme = require'lualine.themes.auto'
my_theme.normal.c.bg = "#223344"
retquire'lualine'.setup{
options = {
theme = my_theme,
}
...
}
You can change the highlight group . If you don't want to do that you can also tweek lualine themes as part of lualine config like following .
Thank you! Is there a way to extract a value from theme to avoid hardcoding color?
my_theme.normal.c.bg already has it's value
You could do something like
local function swap(theme, mode)
theme[mode]b.bg, theme[mode]c.bg = theme[mode]c.bg, theme[mode]b.bg
end
swap(my_theme, 'normal')
swap(my_theme, 'insert')
...
to swap theme .
You can change the highlight group . If you don't want to do that you can also tweek lualine themes as part of lualine config like following .
Got it! Fixed the colorscheme using the following code (I decided to do it without a function:
local my_theme = require('lualine.themes.auto')
my_theme.normal.c.bg = my_theme.normal.b.bg
my_theme.insert.c.bg = my_theme.insert.b.bg
my_theme.replace.c.bg = my_theme.replace.b.bg
my_theme.visual.c.bg = my_theme.visual.b.bg
my_theme.command.c.bg = my_theme.command.b.bg
@shadmansaleh, the setup is broken after 37a3b8cc82c66cc2dc8fbec9ce20b74e81f52aee:
highlight.lua:32: bad argument #1 to 'pairs' (table expected, got nil)
What has changed?
I had mistakenly broke it yesterday ;( . #162 should fix it once merged . Sorry
Here is how it looks for zephyr-nvim:
I also tested with vim-code-dark and it looks weird too.
Is this expected that automatic generation looks like this for some colorschemes?