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:
Akianonymus 2022-08-11 15:40:26 +05:30 committed by Sidhanth Rathod
parent 01b17d2ad6
commit a20fc560f3
3 changed files with 57 additions and 89 deletions

View file

@ -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)

View file

@ -204,6 +204,7 @@ local plugins = {
["folke/which-key.nvim"] = {
disable = true,
module = "which-key",
keys = "<leader>",
config = function()
require "plugins.configs.whichkey"
end,