summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-05-18 21:56:34 +0200
committerThomas Vanbesien <tvanbesi@proton.me>2026-05-18 21:56:34 +0200
commit46dd2ce50b388d8f6e5b0cbebe8fa7e03d47e8b4 (patch)
treec1ebd45ee6efb5dfae430c27d6d60d4d71adb24a /plugin
parent5ca644a073f083d2610ea7989a64541652d48e52 (diff)
downloadnvim-config-46dd2ce50b388d8f6e5b0cbebe8fa7e03d47e8b4.tar.gz
nvim-config-46dd2ce50b388d8f6e5b0cbebe8fa7e03d47e8b4.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.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/50-statusline.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugin/50-statusline.lua b/plugin/50-statusline.lua
index b823f58..e32800e 100644
--- a/plugin/50-statusline.lua
+++ b/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()))