From 2f51c28a3009119c202e73272427b72ebd3eb9cb Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Sun, 7 Jun 2026 14:22:27 +0200 Subject: misc(nvim): edit floating window and popup menu style Same bg as what's behind and a visible rounded border. --- .config/nvim/plugin/40-colors.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.config/nvim/plugin/40-colors.lua b/.config/nvim/plugin/40-colors.lua index c587767..ee6ef3f 100644 --- a/.config/nvim/plugin/40-colors.lua +++ b/.config/nvim/plugin/40-colors.lua @@ -55,6 +55,15 @@ local function adjust_highlight() vim.api.nvim_set_hl(0, "MatchParen", { link = "CurSearch" }) vim.api.nvim_set_hl(0, "WinBarCwd", { fg = solarized_colors.blue, italic = true }) vim.api.nvim_set_hl(0, "WinBarFile", { italic = true }) + -- Floating windows (LSP hover, etc.) follow the editor background; + -- keep the border's line color but match its bg to the float interior. + vim.api.nvim_set_hl(0, "NormalFloat", { link = "Normal" }) + local normal_bg = vim.api.nvim_get_hl(0, { name = "Normal", link = false }).bg + local border_fg = vim.api.nvim_get_hl(0, { name = "FloatBorder", link = false }).fg + vim.api.nvim_set_hl(0, "FloatBorder", { fg = border_fg, bg = normal_bg }) + -- Popup menu (completion, etc.): match the editor background like floats do. + vim.api.nvim_set_hl(0, "Pmenu", { fg = solarized_colors.base0, bg = normal_bg }) + vim.api.nvim_set_hl(0, "PmenuSbar", { bg = normal_bg }) vim.api.nvim_set_hl(0, "TabLine", { fg = solarized_colors.yellow, bold = true }) if vim.o.background == "light" then vim.api.nvim_set_hl(0, "TabLineSel", { bg = "#edffd5", fg = solarized_colors.yellow, bold = true }) -- cgit v1.3.1