Skip to content

Commit 708a27a

Browse files
committed
feat: add MarkSignLineHL
1 parent 74e8d01 commit 708a27a

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ marks.nvim defines the following highlight groups:
175175

176176
`MarkSignNumHL` The highlight group for the number line in a signcolumn.
177177

178+
`MarkSignLineHL` The highlight group for the whole line the sign is placed in.
179+
(The default is "NONE", so it will not be highlighted unless changed.)
180+
178181
`MarkVirtTextHL` The highlight group for bookmark virtual text annotations.
179182

180183
marks.nvim also defines the following commands:

doc/marks-nvim.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,12 @@ see |sign_define()|.
302302
*MarkSignNumHL*
303303
(defaults to |LineNr|)
304304

305-
The highlight group for the number line in a signcolumn: see
306-
|sign_define()|.
305+
The highlight group for the number line in a signcolumn.
306+
307+
*MarkSignLineHL*
308+
(defaults to |NONE|)
309+
310+
The highlight group for the whole line the sign is placed in.
307311

308312
*MarkVirtTextHL*
309313
(defaults to |Comment|)

lua/marks/utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function M.add_sign(bufnr, text, line, id, group, priority)
1212
if not M.sign_cache[sign_name] then
1313
M.sign_cache[sign_name] = true
1414
vim.fn.sign_define(sign_name, { text = text, texthl = "MarkSignHL",
15-
numhl = "MarkSignNumHL" })
15+
numhl = "MarkSignNumHL", linehl = "MarkSignLineHL" })
1616
end
1717
vim.fn.sign_place(id, group, sign_name, bufnr, { lnum = line, priority = priority })
1818
end

plugin/marks.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ endif
44
let g:loaded_marks = 1
55

66
hi default link MarkSignHL Identifier
7-
" hi default link MarkSignLineHL Normal
7+
hi default link MarkSignLineHL NONE
88
hi default link MarkSignNumHL CursorLineNr
99
hi default link MarkVirtTextHL Comment
1010

0 commit comments

Comments
 (0)