Skip to content

Commit d245c0a

Browse files
committed
folding: link FoldColumn highlight to LineNr for visual consistency
1 parent 6eb5449 commit d245c0a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

after/plugin/options.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ vim.api.nvim_create_autocmd('FileType', {
5757
end,
5858
})
5959

60+
-- Match fold column markers to line number colour.
61+
local function link_foldcolumn()
62+
vim.api.nvim_set_hl(0, 'FoldColumn', { link = 'LineNr' })
63+
end
64+
link_foldcolumn()
65+
vim.api.nvim_create_autocmd('ColorScheme', { callback = link_foldcolumn })
66+
6067
-- When nvim is invoked with +N (e.g. nvim file.txt +1234), open the fold at
6168
-- the cursor so the target line is immediately visible. VimEnter fires after
6269
-- the +line command has positioned the cursor, so zv ("view cursor line")

0 commit comments

Comments
 (0)