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

@ -1,5 +1,13 @@
" Only git-tracked files, Vim needs to be in a Git repository
nnoremap <Leader>ff :GFiles<CR>
lua << EOF
local wk = require("which-key")
" Currently open buffers
nnoremap <Leader>fb :Buffers<CR>
local keys = {
f = {
name = "Fuzzy finder",
b = { "<cmd>Buffers<CR>", "Open buffers" },
f = { "<cmd>GFiles<CR>", "Git tracked files" },
},
}
wk.register(keys, { prefix = "<leader>" })
EOF