Skip to content

Commit

Permalink
feat(extensions): more complete hls for gitsigns.nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmckendry committed Aug 13, 2024
1 parent 9f5182a commit abc44e4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lua/cyberdream/extensions/gitsigns.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local M = {}
local util = require("cyberdream.util")

--- Get extension configuration
--- @param opts Config
Expand All @@ -9,6 +10,16 @@ function M.get(opts, t)
GitSignsAdd = { fg = t.green },
GitSignsChange = { fg = t.orange },
GitSignsDelete = { fg = t.red },

GitSignsAddLn = { link = "DiffAdd" },
GitSignsChangeLn = { link = "DiffChange" },
GitSignsDeleteLn = { link = "DiffDelete" },

GitSignsAddInline = { bg = util.blend(t.bg_solid, t.green, 0.9) },
GitSignsChangeInline = { bg = util.blend(t.bg_solid, t.blue, 0.9) },
GitSignsDeleteInline = { bg = util.blend(t.bg_solid, t.red, 0.9) },

GitSignsCurrentLineBlame = { link = "LineNr" },
}

return highlights
Expand Down

2 comments on commit abc44e4

@zackAJ
Copy link
Contributor

@zackAJ zackAJ commented on abc44e4 Aug 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this broke my #119 solution, if you want to override colors make sure to override link also :

GitSignsCurrentLineBlame = { link = "", fg = colors.cyan },

@scottmckendry
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting... I'll have a look at this. Overrides shouldn't require you to explicitly set a link in order to change the foreground. Good catch @zackAJ!

Please sign in to comment.