utils: Improve mapping function | Properly lazy load whichkey
just add desc with normal vim.keymap.set function whichkey will automatically use the descriptions
This commit is contained in:
parent
01b17d2ad6
commit
a20fc560f3
3 changed files with 57 additions and 89 deletions
|
@ -38,14 +38,4 @@ local options = {
|
|||
|
||||
options = require("core.utils").load_override(options, "folke/which-key.nvim")
|
||||
|
||||
local utils = require "core.utils"
|
||||
|
||||
local mappings = utils.load_config().mappings
|
||||
local mapping_groups = { groups = vim.deepcopy(mappings.groups) }
|
||||
|
||||
mappings.disabled = nil
|
||||
mappings.groups = nil
|
||||
|
||||
utils.load_mappings(mapping_groups)
|
||||
|
||||
wk.setup(options)
|
||||
|
|
|
@ -204,6 +204,7 @@ local plugins = {
|
|||
["folke/which-key.nvim"] = {
|
||||
disable = true,
|
||||
module = "which-key",
|
||||
keys = "<leader>",
|
||||
config = function()
|
||||
require "plugins.configs.whichkey"
|
||||
end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue