-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blame in gitsigns not visible when using cursorline #60
Comments
Looks like the git blame color is a bit darker then I would like it to be, and the cursorline can likely be a bit darker. That should solve both issues. |
FWIW, I made this change locally. Doubt it's the right solution, but it uses a color that doesn't clash with the background or cursor line. In the gitsigns plugin, it appears they set the blame text color as
|
As a followup to this thread. When configuring gitsigns plugin, you can switch the color that is used for the blame as follows: Wherever you configure the gitsigns plugin, define a function to handle the formatting of the blame text and in the return value, replace Label is a global color defined by all themes. Works perfect for me and blends in. local status_ok, gitsigns = pcall(require, "gitsigns")
if not status_ok then
vim.notify("gitsigns plugin not found!")
return
end
local function current_line_blame_formatter(_, blame_info, opts)
local text
if blame_info.author == "Not Committed Yet" then
text = blame_info.author
else
local date_time
if opts.relative_time then
date_time = require("gitsigns.util").get_relative_time(tonumber(blame_info["author_time"]))
else
date_time = os.date("%Y-%m-%d", tonumber(blame_info["author_time"]))
end
text = string.format("%s, %s - %s", blame_info.author, date_time, blame_info.summary)
end
return {{" " .. text, "Label"}}
end
gitsigns.setup {
current_line_blame_formatter = current_line_blame_formatter
} |
Same happens with cursor over whitespace. |
I poked around to see if chaning the Value of diff --git a/lua/nord/theme.lua b/lua/nord/theme.lua
index d97df03..aadfd40 100644
--- a/lua/nord/theme.lua
+++ b/lua/nord/theme.lua
@@ -96,7 +96,7 @@ theme.loadEditor = function()
MatchParen = { fg = nord.nord15_gui, bg = nord.none, style = "bold" },
ModeMsg = { fg = nord.nord4_gui },
MoreMsg = { fg = nord.nord4_gui },
- NonText = { fg = nord.nord1_gui },
+ NonText = { fg = nord.nord3_gui_bright },
Pmenu = { fg = nord.nord4_gui, bg = nord.nord2_gui },
PmenuSel = { fg = nord.nord4_gui, bg = nord.nord10_gui },
PmenuSbar = { fg = nord.nord4_gui, bg = nord.nord2_gui }, |
The current-line blame feature of Gitsigns is not visible when cursorline is on. Even with cursorline off, it's very hard to read. In gitsigns that text has a highlight group of
GitSignsCurrentLineBlame
.Using cursorline:
![image](https://user-images.githubusercontent.com/9167199/137989785-0f075925-51cf-499a-9ed7-79991d91808a.png)
No cursorline:
![image](https://user-images.githubusercontent.com/9167199/137989827-a66d057d-5b71-4adf-ba8f-856985d138dc.png)
I can push a PR but I'm not sure what to set the colors to.
The text was updated successfully, but these errors were encountered: