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

17 lines
522 B
Lua

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