From ab66824949ddb05ddece0dc845b9ff022cb4ce92 Mon Sep 17 00:00:00 2001 From: c0r73x Date: Tue, 18 Jun 2024 12:34:08 +0200 Subject: [PATCH 1/2] Added curhl to change the cursorline highlight for signs --- lua/gitsigns/signs.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/gitsigns/signs.lua b/lua/gitsigns/signs.lua index f8ff60677..459aa7d68 100644 --- a/lua/gitsigns/signs.lua +++ b/lua/gitsigns/signs.lua @@ -63,6 +63,7 @@ function M:add(bufnr, signs) sign_text = config.signcolumn and text or '', priority = config.sign_priority, sign_hl_group = hls.hl, + cursorline_hl_group = hls.curhl or nil, number_hl_group = config.numhl and hls.numhl or nil, line_hl_group = config.linehl and hls.linehl or nil, }) From aa7bae1b82bd7c6b0dbce22a165f54b7a5cf226f Mon Sep 17 00:00:00 2001 From: c0r73x Date: Wed, 19 Jun 2024 11:56:54 +0200 Subject: [PATCH 2/2] Added curhl to default config --- lua/gitsigns/config.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lua/gitsigns/config.lua b/lua/gitsigns/config.lua index 860b48418..ad36ab3ce 100644 --- a/lua/gitsigns/config.lua +++ b/lua/gitsigns/config.lua @@ -35,6 +35,7 @@ --- @field hl string --- @field text string --- @field numhl string +--- @field curhl string --- @field linehl string --- @alias Gitsigns.SignType @@ -188,36 +189,47 @@ M.schema = { type = 'table', deep_extend = true, default = { - add = { hl = 'GitSignsAdd', text = '┃', numhl = 'GitSignsAddNr', linehl = 'GitSignsAddLn' }, + add = { + hl = 'GitSignsAdd', + text = '┃', + numhl = 'GitSignsAddNr', + linehl = 'GitSignsAddLn', + curhl = 'GitSignsAdd', + }, change = { hl = 'GitSignsChange', text = '┃', numhl = 'GitSignsChangeNr', linehl = 'GitSignsChangeLn', + curhl = 'GitSignsChange', }, delete = { hl = 'GitSignsDelete', text = '▁', numhl = 'GitSignsDeleteNr', linehl = 'GitSignsDeleteLn', + curhl = 'GitSignsDelete', }, topdelete = { hl = 'GitSignsTopdelete', text = '▔', numhl = 'GitSignsTopdeleteNr', linehl = 'GitSignsTopdeleteLn', + curhl = 'GitSignsTopdelete', }, changedelete = { hl = 'GitSignsChangedelete', text = '~', numhl = 'GitSignsChangedeleteNr', linehl = 'GitSignsChangedeleteLn', + curhl = 'GitSignsChangedelete', }, untracked = { hl = 'GitSignsUntracked', text = '┆', numhl = 'GitSignsUntrackedNr', linehl = 'GitSignsUntrackedLn', + curhl = 'GitSignsUntracked', }, }, default_help = [[{ @@ -253,30 +265,35 @@ M.schema = { text = '┃', numhl = 'GitSignsStagedAddNr', linehl = 'GitSignsStagedAddLn', + curhl = 'GitSignsStagedAdd', }, change = { hl = 'GitSignsStagedChange', text = '┃', numhl = 'GitSignsStagedChangeNr', linehl = 'GitSignsStagedChangeLn', + curhl = 'GitSignsStagedChange', }, delete = { hl = 'GitSignsStagedDelete', text = '▁', numhl = 'GitSignsStagedDeleteNr', linehl = 'GitSignsStagedDeleteLn', + curhl = 'GitSignsStagedDelete', }, topdelete = { hl = 'GitSignsStagedTopdelete', text = '▔', numhl = 'GitSignsStagedTopdeleteNr', linehl = 'GitSignsStagedTopdeleteLn', + curhl = 'GitSignsStagedTopdelete', }, changedelete = { hl = 'GitSignsStagedChangedelete', text = '~', numhl = 'GitSignsStagedChangedeleteNr', linehl = 'GitSignsStagedChangedeleteLn', + curhl = 'GitSignsStagedChangedelete', }, }, default_help = [[{