diff --git a/lua/rakshit/plugins/git-blame.lua b/lua/rakshit/plugins/git-blame.lua index 8f41353f..d9b152e1 100644 --- a/lua/rakshit/plugins/git-blame.lua +++ b/lua/rakshit/plugins/git-blame.lua @@ -6,15 +6,20 @@ return { -- The plugin wil only load once one of the keys is used. -- If you want to load the plugin at startup, add something like event = "VeryLazy", -- or lazy = false. One of both options will work. - opts = { - -- your configuration comes here - -- for example - enabled = true, -- if you want to enable the plugin - message_template = " • <>", -- template for the blame message, check the Message template section for more options - date_format = "%b-%d-%Y", -- template for the date, check Date format section for more options - virtual_text_column = 80, -- virtual text start column, check Start virtual text at column section for more options - message_when_not_committed = "Not committed yet", - display_virtual_text = 1, - highlight_group = "Question", - }, + opts = function() + local hl_cursor_line = vim.api.nvim_get_hl(0, { name = "CursorLine" }) + local hl_comment = vim.api.nvim_get_hl(0, { name = "Comment" }) + local hl_combined = vim.tbl_extend("force", hl_comment, { bg = hl_cursor_line.bg }) + vim.api.nvim_set_hl(0, "CursorLineBlame", hl_combined) + return { + enabled = true, + highlight_group = "CursorLineBlame", + message_template = " • <>", -- template for the blame message, check the Message template section for more options + date_format = "%b-%d-%Y", -- template for the date, check Date format section for more options + virtual_text_column = 80, -- virtual text start column, check Start virtual text at column section for more options + message_when_not_committed = "Not committed yet", + display_virtual_text = 1, + -- highlight_group = "Question", + } + end, }