From 5211bdc102fc61992bb32231188c79aa1cdf600d Mon Sep 17 00:00:00 2001 From: He4eT Date: Sun, 24 Aug 2025 16:57:11 +0200 Subject: [PATCH] nvim: add gitsign keymaps --- nvim/init.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nvim/init.lua b/nvim/init.lua index 288538e..ea23780 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -273,9 +273,12 @@ require('lazy').setup({ }, } - vim.keymap.set('n', '[g', ':Gitsigns prev_hunk', { desc = 'Go to previous git hunk' }) - vim.keymap.set('n', ']g', ':Gitsigns next_hunk', { desc = 'Go to next git hunk' }) - vim.keymap.set('n', 'gb', ':Gitsigns blame_line', { desc = 'Show git blame' }) + vim.keymap.set('n', '[g', ':Gitsigns prev_hunk', { desc = 'Go to previous Git hunk' }) + vim.keymap.set('n', ']g', ':Gitsigns next_hunk', { desc = 'Go to next Git hunk' }) + + vim.keymap.set('n', 'gb', ':Gitsigns blame_line', { desc = 'Show [G]it [B]lame' }) + vim.keymap.set('n', 'gj', ':Gitsigns stage_hunk', { desc = 'Stage/unstage current hunk' }) + vim.keymap.set('n', 'gk', ':Gitsigns preview_hunk', { desc = 'Show [G]it hun[k] preview' }) end, }, --[[ cfg_lazy_desolate: Not-so-colorful colorscheme ]]