perf: setup which-key inside config() and load autocmds and keymaps as normal
This commit is contained in:
3 files changed
+9
-13
No files matched your search
@@ -1,10 +1,4 @@
|
||||
require("config.options")
|
||||
require("config.lazy")
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "VeryLazy",
|
||||
callback = function()
|
||||
require("config.autocmds")
|
||||
require("config.keymaps")
|
||||
end,
|
||||
})
|
||||
@@ -76,8 +76,3 @@ vim.keymap.set("n", "<leader>gg", function()
|
||||
},
|
||||
})
|
||||
end, { desc = "Lazygit" })
|
||||
|
||||
require("which-key").register({
|
||||
f = { name = "+file" },
|
||||
g = { name = "+git" },
|
||||
}, { prefix = "<leader>" })
|
||||
@@ -33,11 +33,18 @@ return {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
config = {
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user