support wichkey custom

This commit is contained in:
asep komarudin 2023-02-22 10:52:37 +07:00
parent 14d70c6a17
commit 7bca70bee7
2 changed files with 16 additions and 0 deletions

View file

@ -396,6 +396,15 @@ local mappings = {
["o"] = { "<cmd>SymbolsOutline<cr>", "Symbol Outline" },
}
local wkey = {}
local data_exists, key = pcall(require, "custom.whichkey")
if data_exists then
if type(key) == "table" then
wkey = key
end
end
which_key.setup(setup)
which_key.register(mappings, opts)
which_key.register(wkey, opts)
which_key.register(mappings2, opts2)