refactor(nvim): improve handling of setting cul hls in statuscol
This commit is contained in:
parent
eb98162264
commit
82f65bc4ed
@ -23,10 +23,11 @@ return {
|
|||||||
local name = sign.texthl
|
local name = sign.texthl
|
||||||
if name and not sign.culhl then
|
if name and not sign.culhl then
|
||||||
local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
|
local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
|
||||||
vim.api.nvim_set_hl(0, name, { fg = hl.fg, bg = bg })
|
vim.api.nvim_set_hl(0, name, vim.tbl_deep_extend("force", hl, { bg = bg, force = true }))
|
||||||
name = name .. "Cul"
|
local cul_hl_name = name .. "Cul"
|
||||||
vim.api.nvim_set_hl(0, name, { fg = hl.fg, bg = cl_bg })
|
vim.api.nvim_set_hl(0, cul_hl_name, vim.tbl_deep_extend("force", hl, { bg = cl_bg, nocombine = true, force = true }))
|
||||||
vim.fn.sign_define(sign.name, { culhl = name })
|
sign.culhl = cul_hl_name
|
||||||
|
vim.fn.sign_define(sign.name, sign)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user