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/cmp.lua | |
parent | 4b9f4b2ae6dfc034ba10abab5ab91c357c058734 (diff) |
refactor: use callbacks for configuring builtins
Diffstat (limited to 'lua/lvim/core/cmp.lua')
-rw-r--r-- | lua/lvim/core/cmp.lua | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lua/lvim/core/cmp.lua b/lua/lvim/core/cmp.lua index 142d548f..2360947f 100644 --- a/lua/lvim/core/cmp.lua +++ b/lua/lvim/core/cmp.lua @@ -127,9 +127,7 @@ M.config = function() return end - lvim.builtin.cmp = { - active = true, - on_config_done = nil, + local config = { enabled = function() local buftype = vim.api.nvim_buf_get_option(0, "buftype") if buftype == "prompt" then @@ -354,6 +352,8 @@ M.config = function() }, }, } + ---@cast config +LvimBuiltin + lvim.builtin.cmp = config end function M.setup() @@ -368,10 +368,6 @@ function M.setup() }) end end - - if lvim.builtin.cmp.on_config_done then - lvim.builtin.cmp.on_config_done(cmp) - end end return M |