From 300d300664ac31788997a653370558ff3e7baf9f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 30 Mar 2025 10:13:20 +0200 Subject: [PATCH] nvim: fix lualine background --- nvim/lua/user/plugins/core/colorscheme.lua | 8 ++- nvim/lua/user/plugins/ui/statusline.lua | 68 ++++++++++------------ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/nvim/lua/user/plugins/core/colorscheme.lua b/nvim/lua/user/plugins/core/colorscheme.lua index fe15917..4c11770 100644 --- a/nvim/lua/user/plugins/core/colorscheme.lua +++ b/nvim/lua/user/plugins/core/colorscheme.lua @@ -87,8 +87,12 @@ local options = { UfoFoldedEllipsis = { link = "Comment" }, -- Statusline - StatusLine = { fg = colors.text, bg = colors.crust }, - StatusLineNormal = { link = "StatusLine" }, + + -- Something resets StatusLine highlight background, so use another one for now :) + -- StatusLine = { fg = colors.text, bg = colors.crust }, + StatusLineLualine = { fg = colors.text, bg = colors.crust }, + + StatusLineNormal = { link = "StatusLineLualine" }, StatusLineSeparator = { fg = colors.rosewater, bg = colors.crust }, StatusLineInsert = { fg = colors.base, bg = colors.blue }, StatusLineVisual = { fg = colors.base, bg = colors.mauve }, diff --git a/nvim/lua/user/plugins/ui/statusline.lua b/nvim/lua/user/plugins/ui/statusline.lua index d3e0bbb..e8af085 100644 --- a/nvim/lua/user/plugins/ui/statusline.lua +++ b/nvim/lua/user/plugins/ui/statusline.lua @@ -41,38 +41,34 @@ return { disabled_filetypes = { statusline = { "dashboard", - "alpha", + "alpha", }, - winbar = { - "neo-tree", - "NvimTree", - "alpha" - } + winbar = { + "neo-tree", + "NvimTree", + "alpha" + } }, theme = { normal = { a = "StatusLineNormal", - b = "StatusLine", - c = "StatusLine", - x = "StatusLine", - y = "StatusLine", - z = "StatusLine", + b = "StatusLineLualine", + c = "StatusLineLualine", + x = "StatusLineLualine", + y = "StatusLineLualine", + z = "StatusLineLualine", }, command = { a = "StatusLineCommand", - z = "StatusLine", }, insert = { a = "StatusLineInsert", - z = "StatusLine", }, visual = { a = "StatusLineVisual", - z = "StatusLine", }, replace = { a = "StatusLineReplace", - z = "StatusLine", }, }, }, @@ -115,12 +111,12 @@ return { linter, }, lualine_c = {}, - lualine_x = { - { + lualine_x = { + { "filetype", cond = is_not_popup }, - { + { "fileformat", symbols = { unix = "NL", @@ -129,29 +125,16 @@ return { } }, indent_settings, - }, - lualine_y = { + }, + lualine_y = { "location", "progress", - }, + }, lualine_z = {}, }, winbar = { - lualine_c = { - { "filetype", icon_only = true }, - { - "filename", - cond = is_not_popup, - path = 1, - symbols = vim.tbl_deep_extend("force", icons.file_status, { - unnamed = "", - }) - }, - }, - }, - inactive_winbar = { - lualine_c = { - { "filetype", icon_only = true }, + lualine_c = { + { "filetype", icon_only = true }, { "filename", cond = is_not_popup, @@ -162,6 +145,19 @@ return { }, }, }, + inactive_winbar = { + lualine_c = { + { "filetype", icon_only = true }, + { + "filename", + cond = is_not_popup, + path = 1, + symbols = vim.tbl_deep_extend("force", icons.file_status, { + unnamed = "", + }) + }, + }, + }, extensions = { "lazy", "neo-tree",