summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/nvim/plugin/50-statusline.lua25
1 files changed, 13 insertions, 12 deletions
diff --git a/.config/nvim/plugin/50-statusline.lua b/.config/nvim/plugin/50-statusline.lua
index eea1291..e1d1687 100644
--- a/.config/nvim/plugin/50-statusline.lua
+++ b/.config/nvim/plugin/50-statusline.lua
@@ -45,28 +45,29 @@ local lualine_sections = {
lualine_x = { "encoding", "fileformat", "filetype", "lsp_status" },
}
+local lualine_options = {
+ disabled_filetypes = { "netrw", "qf" },
+ component_separators = { left = "|", right = "|" },
+ section_separators = { left = "", right = "" },
+}
+
+local function setup()
+ lualine_options.theme = vim.o.background == "light" and "solarized_light" or "solarized_dark"
+ lualine.setup({ options = lualine_options, sections = lualine_sections })
+end
+
-- Adjust colors when the theme (light/dark) changes
vim.api.nvim_create_autocmd("OptionSet", {
desc = "Adjust color scheme",
pattern = "background",
group = vim.g.dotfiles.augroup,
callback = function()
- lualine.setup({
- options = {
- theme = vim.o.background == "light" and "solarized_light" or "solarized_dark",
- disabled_filetypes = { "netrw", "qf" },
- component_separators = { left = "|", right = "|" },
- section_separators = { left = "", right = "" },
- },
- })
+ setup()
vim.schedule(bold_diff_diag)
end,
})
-lualine.setup({
- options = { theme = vim.o.background == "light" and "solarized_light" or "solarized_dark" },
- sections = lualine_sections,
-})
+setup()
vim.schedule(bold_diff_diag)
vim.api.nvim_create_user_command("LualineConfig", function()