From 82f65bc4ed77b7b51ffc63617c073fea4341c0cf Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Tue, 20 Feb 2024 17:39:27 -0600 Subject: [PATCH] refactor(nvim): improve handling of setting cul hls in statuscol --- dots/.config/nvim/lua/plugins/configs/statuscol.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dots/.config/nvim/lua/plugins/configs/statuscol.lua b/dots/.config/nvim/lua/plugins/configs/statuscol.lua index e10c5aa6..37ce04fb 100644 --- a/dots/.config/nvim/lua/plugins/configs/statuscol.lua +++ b/dots/.config/nvim/lua/plugins/configs/statuscol.lua @@ -23,10 +23,11 @@ return { local name = sign.texthl if name and not sign.culhl then local hl = vim.api.nvim_get_hl(0, { name = name, link = false }) - vim.api.nvim_set_hl(0, name, { fg = hl.fg, bg = bg }) - name = name .. "Cul" - vim.api.nvim_set_hl(0, name, { fg = hl.fg, bg = cl_bg }) - vim.fn.sign_define(sign.name, { culhl = name }) + vim.api.nvim_set_hl(0, name, vim.tbl_deep_extend("force", hl, { bg = bg, force = true })) + local cul_hl_name = name .. "Cul" + vim.api.nvim_set_hl(0, cul_hl_name, vim.tbl_deep_extend("force", hl, { bg = cl_bg, nocombine = true, force = true })) + sign.culhl = cul_hl_name + vim.fn.sign_define(sign.name, sign) end end end)