diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 0b1c7378..1d4223ee 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -41,24 +41,24 @@ return { -- Actions -- visual mode - map('v', 'hs', function() + map('v', 'ghs', function() gs.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'stage git hunk' }) - map('v', 'hr', function() + map('v', 'ghr', function() gs.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'reset git hunk' }) -- normal mode - map('n', 'hs', gs.stage_hunk, { desc = 'git stage hunk' }) - map('n', 'hr', gs.reset_hunk, { desc = 'git reset hunk' }) - map('n', 'hS', gs.stage_buffer, { desc = 'git Stage buffer' }) - map('n', 'hu', gs.undo_stage_hunk, { desc = 'undo stage hunk' }) - map('n', 'hR', gs.reset_buffer, { desc = 'git Reset buffer' }) - map('n', 'hp', gs.preview_hunk, { desc = 'preview git hunk' }) - map('n', 'hb', function() + map('n', 'ghs', gs.stage_hunk, { desc = 'git stage hunk' }) + map('n', 'ghr', gs.reset_hunk, { desc = 'git reset hunk' }) + map('n', 'ghS', gs.stage_buffer, { desc = 'git Stage buffer' }) + map('n', 'ghu', gs.undo_stage_hunk, { desc = 'undo stage hunk' }) + map('n', 'ghR', gs.reset_buffer, { desc = 'git Reset buffer' }) + map('n', 'ghp', gs.preview_hunk, { desc = 'preview git hunk' }) + map('n', 'ghb', function() gs.blame_line { full = false } end, { desc = 'git blame line' }) - map('n', 'hd', gs.diffthis, { desc = 'git diff against index' }) - map('n', 'hD', function() + map('n', 'ghd', gs.diffthis, { desc = 'git diff against index' }) + map('n', 'ghD', function() gs.diffthis '~' end, { desc = 'git diff against last commit' }) diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua index 7dc820a9..c5dbc061 100644 --- a/lua/plugins/whichkey.lua +++ b/lua/plugins/whichkey.lua @@ -5,7 +5,7 @@ return { 'folke/which-key.nvim', opts = {}, ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, ['g'] = { name = '[G]it', _ = 'which_key_ignore' }, - ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, + ['gh'] = { name = '[G]it [H]unk', _ = 'which_key_ignore' }, ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' },