diff options
author | LostNeophyte <[email protected]> | 2023-01-25 11:06:39 +0100 |
---|---|---|
committer | LostNeophyte <[email protected]> | 2023-01-25 11:11:25 +0100 |
commit | eba121cc651413d753f688162413008a6ed455e2 (patch) | |
tree | 737757af86e0be6a2517e4ad21fffb859621494f /lua/lvim/core/which-key.lua | |
parent | 4b9f4b2ae6dfc034ba10abab5ab91c357c058734 (diff) |
refactor: use callbacks for configuring builtins
Diffstat (limited to 'lua/lvim/core/which-key.lua')
-rw-r--r-- | lua/lvim/core/which-key.lua | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lua/lvim/core/which-key.lua b/lua/lvim/core/which-key.lua index 8cedeabc..cfff800c 100644 --- a/lua/lvim/core/which-key.lua +++ b/lua/lvim/core/which-key.lua @@ -1,9 +1,6 @@ local M = {} M.config = function() - lvim.builtin.which_key = { - ---@usage disable which-key completely [not recommended] - active = true, - on_config_done = nil, + local config = { setup = { plugins = { marks = false, -- shows a list of your marks on ' and ` @@ -298,6 +295,8 @@ M.config = function() }, }, } + ---@cast config +LvimBuiltin + lvim.builtin.which_key = config end M.setup = function() @@ -313,10 +312,6 @@ M.setup = function() which_key.register(mappings, opts) which_key.register(vmappings, vopts) - - if lvim.builtin.which_key.on_config_done then - lvim.builtin.which_key.on_config_done(which_key) - end end return M |