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
Raw Normal View History

local gitsigns_status_ok, gitsigns = pcall(require, "gitsigns")
if not gitsigns_status_ok then
return
end
gitsigns.setup {
linehl = false,
numhl = true,
2023-01-23 18:12:25 +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>");