This repository has been archived on 2025-01-07. You can view files and clone it, but cannot push or open issues or pull requests.
opdavies.nvim/after/plugin/gitsigns.lua

19 lines
495 B
Lua

local gitsigns_status_ok, gitsigns = pcall(require, "gitsigns")
if not gitsigns_status_ok then
return
end
gitsigns.setup {
linehl = false,
numhl = true,
}
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);