2021-12-23 23:13:45 +00:00
|
|
|
local gitsigns_status_ok, gitsigns = pcall(require, "gitsigns")
|
|
|
|
if not gitsigns_status_ok then
|
|
|
|
return
|
|
|
|
end
|
2021-11-17 09:00:00 +00:00
|
|
|
|
2021-12-23 23:13:45 +00:00
|
|
|
gitsigns.setup {
|
2021-11-17 09:00:00 +00:00
|
|
|
linehl = false,
|
|
|
|
numhl = true,
|
2023-01-23 18:12:25 +00:00
|
|
|
}
|
2021-11-17 09:00:00 +00:00
|
|
|
|
2023-03-22 22:22:08 +00:00
|
|
|
vim.keymap.set('n', '[h', "<cmd>Gitsigns prev_hunk<cr>");
|
|
|
|
vim.keymap.set('n', ']h', "<cmd>Gitsigns next_hunk<cr>");
|
|
|
|
vim.keymap.set('n', 'gS', "<cmd>Gitsigns undo_stage_hunk<cr>");
|
|
|
|
vim.keymap.set('n', 'gb', "<cmd>Gitsigns blame_line<cr>");
|
|
|
|
vim.keymap.set('n', 'gp', "<cmd>Gitsigns preview_hunk<cr>");
|
|
|
|
vim.keymap.set('n', 'gs', "<cmd>Gitsigns stage_hunk<cr>");
|