nvim: update gitsigns configuration
This commit is contained in:
parent
01eebfbefe
commit
a666dbd912
|
@ -1,31 +1,18 @@
|
|||
local colorbuddy_status_ok, colorbuddy = pcall(require, "colorbuddy")
|
||||
if not colorbuddy_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local gitsigns_status_ok, gitsigns = pcall(require, "gitsigns")
|
||||
if not gitsigns_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local c = require("colorbuddy.color").colors
|
||||
local Group = require("colorbuddy.group").Group
|
||||
|
||||
Group.new("GitSignsAdd", c.green)
|
||||
Group.new("GitSignsChange", c.yellow)
|
||||
Group.new("GitSignsDelete", c.red)
|
||||
|
||||
gitsigns.setup {
|
||||
linehl = false,
|
||||
numhl = true,
|
||||
|
||||
signs = {
|
||||
add = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr" },
|
||||
change = { hl = "GitSignsChange", text = "│", numhl = "GitSignsChangeNr" },
|
||||
delete = { hl = "GitSignsDelete", text = "_", numhl = "GitSignsDeleteNr" },
|
||||
topdelete = { hl = "GitSignsDelete", text = "‾", numhl = "GitSignsDeleteNr" },
|
||||
changedelete = { hl = "GitSignsDelete", text = "~", numhl = "GitSignsChangeNr" },
|
||||
},
|
||||
|
||||
word_diff = false,
|
||||
}
|
||||
|
||||
local actions = require("gitsigns.actions")
|
||||
|
||||
vim.keymap.set('n', '[h', actions.prev_hunk);
|
||||
vim.keymap.set('n', ']h', actions.next_hunk);
|
||||
vim.keymap.set('n', 'gS', actions.undo_stage_hunk);
|
||||
vim.keymap.set('n', 'gb', actions.blame_line);
|
||||
vim.keymap.set('n', 'gp', actions.preview_hunk);
|
||||
vim.keymap.set('n', 'gs', actions.stage_hunk);
|
||||
|
|
Reference in a new issue