mirror of
https://github.com/tcaxle/kickstart.nvim.git
synced 2025-12-13 17:17:01 +00:00
Adding [+c and ]+c to move to diffs and leader+ph to show a pop up with the preview diff value.
This commit is contained in:
13
init.lua
13
init.lua
@@ -109,6 +109,19 @@ require('lazy').setup({
|
|||||||
topdelete = { text = '‾' },
|
topdelete = { text = '‾' },
|
||||||
changedelete = { text = '~' },
|
changedelete = { text = '~' },
|
||||||
},
|
},
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
local function map(mode, lhs, rhs, opts)
|
||||||
|
opts = vim.tbl_extend('force', {noremap = true, silent = true}, opts or {})
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Navigation
|
||||||
|
map('n', ']c', "&diff ? ']c' : '<cmd>Gitsigns next_hunk<CR>'", {expr=true})
|
||||||
|
map('n', '[c', "&diff ? '[c' : '<cmd>Gitsigns prev_hunk<CR>'", {expr=true})
|
||||||
|
|
||||||
|
-- Actions
|
||||||
|
map('n', '<leader>ph', '<cmd>Gitsigns preview_hunk<CR>')
|
||||||
|
end
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user