home: vim: git: map keys on start

Instead of mapping those keys when `gitsigns` attaches to a buffer...
This commit is contained in:
Bruno BELANYI 2022-04-20 14:01:00 +02:00
parent 80c2c415fb
commit e073cc900c
1 changed files with 50 additions and 53 deletions

View File

@ -1,5 +1,6 @@
lua << EOF
local gitsigns = require('gitsigns')
local wk = require("which-key")
gitsigns.setup({
-- I dislike the full-green sign column when this happens
@ -9,9 +10,7 @@ gitsigns.setup({
-- Show the blame quickly
delay = 100,
},
on_attach = function(bufnr)
local wk = require("which-key")
})
local keys = {
-- Navigation
@ -61,6 +60,4 @@ gitsigns.setup({
wk.register(keys, { buffer = bufnr })
wk.register(objects, { buffer = bufnr, mode = "o" })
wk.register(visual, { buffer = bufnr, mode = "x" })
end,
})
EOF