fix(highlights): Only inherit fg for FoldMarker and Guides highlights
This commit is contained in:
@@ -51,17 +51,21 @@ function M.setup_highlights()
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Only inherit fg and bg for OutlineGuides because we do not want the other
|
-- Only inherit fg for these highlights because we do not want the other
|
||||||
-- stylings messing up the alignment.
|
-- stylings messing up the alignment, nor the background so that cursorline
|
||||||
if vim.fn.hlexists('OutlineGuides') == 0 then
|
-- can look normal when on top of it. This can be customized by setting these
|
||||||
vim.api.nvim_set_hl(0, 'OutlineGuides', get_hl_by_name('Comment'))
|
-- highlights before outline.setup() is called, or using winhl.
|
||||||
|
for name, link in pairs({ Guides = 'Comment', FoldMarker = 'Normal' }) do
|
||||||
|
if vim.fn.hlexists('Outline'..name) == 0 then
|
||||||
|
local h = get_hl_by_name(link)
|
||||||
|
vim.api.nvim_set_hl(0, 'Outline'..name, { fg = h.fg, ctermfg = h.fg })
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for name, link in pairs({
|
for name, link in pairs({
|
||||||
Details = 'Comment',
|
Details = 'Comment',
|
||||||
Lineno = 'LineNr',
|
Lineno = 'LineNr',
|
||||||
JumpHighlight = 'Visual',
|
JumpHighlight = 'Visual',
|
||||||
FoldMarker = 'Normal',
|
|
||||||
}) do
|
}) do
|
||||||
if vim.fn.hlexists('Outline' .. name) == 0 then
|
if vim.fn.hlexists('Outline' .. name) == 0 then
|
||||||
vim.api.nvim_set_hl(0, 'Outline' .. name, { link = link })
|
vim.api.nvim_set_hl(0, 'Outline' .. name, { link = link })
|
||||||
|
|||||||
Reference in New Issue
Block a user