Skip to content

Commit

Permalink
style(heirline.nvim): improve git dirty/delta colors (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 committed Apr 28, 2024
1 parent 345c646 commit 25092e9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lua/configs/rebelot/heirline-nvim/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ local GitBranch = {
return type(git_branch_status_cache) == "table" and git_branch_status_cache["changed"] ~= nil
end,
hl = function(self)
return { fg = "git_change", bg = "normal_bg3" }
return { fg = "git_dirty", bg = "normal_bg3" }
end,
},
{
Expand All @@ -255,7 +255,7 @@ local GitBranch = {
and type(git_branch_status_cache["ahead"]) == "number"
end,
hl = function(self)
return { fg = "git_add", bg = "normal_bg3" }
return { fg = "git_ahead", bg = "normal_bg3" }
end,
},
{
Expand All @@ -268,7 +268,7 @@ local GitBranch = {
and type(git_branch_status_cache["behind"]) == "number"
end,
hl = function(self)
return { fg = "git_delete", bg = "normal_bg3" }
return { fg = "git_behind", bg = "normal_bg3" }
end,
},
{
Expand Down Expand Up @@ -696,6 +696,9 @@ local function setup_colors(colorname)
"fg",
red
)
local git_ahead = get_terminal_color_with_fallback(3, yellow)
local git_behind = get_terminal_color_with_fallback(3, yellow)
local git_dirty = get_terminal_color_with_fallback(1, magenta)

local text_bg, text_fg
local normal_bg, normal_fg
Expand Down Expand Up @@ -1007,6 +1010,9 @@ local function setup_colors(colorname)
git_add = git_add,
git_change = git_change,
git_delete = git_delete,
git_ahead = git_ahead,
git_behind = git_behind,
git_dirty = git_dirty,
}
end

Expand Down

0 comments on commit 25092e9

Please sign in to comment.