diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-18 21:56:34 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-18 21:56:34 +0200 |
| commit | 2f2198086eb4405bbe9628c80267eab3366ec932 (patch) | |
| tree | bee1aaf6f0ee397013376099573b70901fc997a5 | |
| parent | b9c110b199109e833441f8352aeeecc2a7d0b7ea (diff) | |
| download | dotfiles-2f2198086eb4405bbe9628c80267eab3366ec932.tar.gz dotfiles-2f2198086eb4405bbe9628c80267eab3366ec932.zip | |
fix(nvim): match initial lualine theme to 'background'
The hardcoded "solarized_light" loaded before any OptionSet autocmd
could react to 'background', so dark sessions started with a light
statusline until 'background' was touched.
| -rw-r--r-- | .config/nvim/plugin/50-statusline.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/.config/nvim/plugin/50-statusline.lua b/.config/nvim/plugin/50-statusline.lua index b823f58..e32800e 100644 --- a/.config/nvim/plugin/50-statusline.lua +++ b/.config/nvim/plugin/50-statusline.lua @@ -43,7 +43,10 @@ vim.api.nvim_create_autocmd("OptionSet", { end, }) -lualine.setup({ options = { theme = "solarized_light" }, sections = lualine_sections }) +lualine.setup({ + options = { theme = vim.o.background == "light" and "solarized_light" or "solarized_dark" }, + sections = lualine_sections, +}) vim.api.nvim_create_user_command("LualineConfig", function() vim.notify(vim.inspect(lualine.get_config())) |
