perf: setup which-key inside config() and load autocmds and keymaps as normal

This commit is contained in:
Folke Lemaitre 2022-12-31 18:14:46 +01:00
parent 6dd32b53e5
commit 478f75cb76
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 14 additions and 18 deletions

View file

@ -33,11 +33,18 @@ return {
{
"folke/which-key.nvim",
event = "VeryLazy",
config = {
show_help = false,
plugins = { spelling = true },
key_labels = { ["<leader>"] = "SPC" },
},
config = function()
local wk = require("which-key")
wk.setup({
show_help = false,
plugins = { spelling = true },
key_labels = { ["<leader>"] = "SPC" },
})
wk.register({
f = { name = "+file" },
g = { name = "+git" },
}, { prefix = "<leader>" })
end,
},
-- git signs