Nvim: add keybinds to move to next/prev hunk

This commit is contained in:
Marko Korhonen 2023-08-21 15:26:33 +03:00
parent 97438e63cb
commit 0e8d8d3160
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890

View file

@ -1,5 +1,6 @@
return function()
local wk = require("which-key")
local gitsigns = require("gitsigns")
wk.setup({})
wk.register({
@ -10,6 +11,8 @@ return function()
wk.register({
["<C-n>"] = { "<cmd>bnext<CR>", "Next buffer" },
["<C-b>"] = { "<cmd>bprevious<CR>", "Previous buffer" },
["["] = { h = { gitsigns.prev_hunk, "Previous hunk" } },
["]"] = { h = { gitsigns.next_hunk, "Next hunk" } },
})
-- Exit terminal insert mode with esc