Closed SenchoPens closed 3 years ago
I can create a pull request to README.md, if this is issue is reproducable.
I think this is resolved in #308 can you check ?
Sorry to not respond on time, it is now resolved, thanks! However, the colors it chooses will not adjust to a new theme, so it will be looking like this
while evaluating colorscheme ...
before requiring lua line works fine and produces great colors. Running :lua require'lualine.themes.auto'
won't change anything, so a :LualineReload
command could come in handy, or just a mention in the docs to colorscheme before setting lualine up.
require'lualine'.setup()
will reload luaine .
Though I can't understand why you can't set colorscheme before lualine in the first place .
Yeah, I can, but maybe the fact that the colorscheme must be set before lualine might be worth mentioning in the docs, bc otherwise it might be hard to debug the wrong colours. I can make a PR if you agree.
I feel like
auto is a special theme. It will automaticaly load theme for your colorscheme. If there's no theme available for your colorscheme then it'll it's best to generate one.
in https://github.com/shadmansaleh/lualine.nvim/blob/master/THEMES.md#auto implies you will load your desired colorscheme before lualine
Reasonable, ok, I agree, must have hurried and misunderstood this somehow, thanks
Self Checks
How to reproduce the problem
Before running
colorscheme ...
:lua require'lualine.themes.auto'
Actual behaviour
E5108: Error executing lua ...e-manager/start/lualine-nvim/lua/lualine/themes/auto.lua:32: attempt to index local 'rgb_color_str' (a nil value)
Expected behaviour
Auto module is loaded, or it is made clear in the docs that 'auto' only works after setting colorscheme.
Aditional information
Minimal config to reproduce the issue
Config
require('lualine').setup()