home: vim: use 'which-key'

This commit is contained in:
Bruno BELANYI 2022-02-26 14:44:52 +01:00
parent 9e7f7ed736
commit 4fec4d499d
5 changed files with 54 additions and 21 deletions

View file

@ -0,0 +1,20 @@
lua << EOF
local wk = require("which-key")
local keys = {
d = {
name = "Merging diff hunks",
o = { "<cmd>diffget<CR>", "Use this buffer's change", mode="x" },
p = { "<cmd>diffput<CR>", "Accept other buffer change", mode="x" },
},
["<leader>g"] = {
name = "Git",
d = { "<cmd>Gdiffsplit<CR>", "Current buffer diff" },
l = { "<cmd>:sp<CR><C-w>T:Gllog --follow -- %:p<CR>", "Current buffer log" },
m = { "<Plug>(git-messenger)", "Current line blame" },
s = { "<cmd>Gstatus<CR>", "Status" },
},
}
wk.register(keys)
EOF