Преглед изворни кода

feat(cmp): add on_config_done callback (#3589)

Mathieu Cartaud пре 2 година
родитељ
комит
f50e49a3cc
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      lua/lvim/core/cmp.lua

+ 5 - 0
lua/lvim/core/cmp.lua

@@ -129,6 +129,7 @@ M.config = function()
 
   lvim.builtin.cmp = {
     active = true,
+    on_config_done = nil,
     enabled = function()
       local buftype = vim.api.nvim_buf_get_option(0, "buftype")
       if buftype == "prompt" then
@@ -367,6 +368,10 @@ function M.setup()
       })
     end
   end
+  
+  if lvim.builtin.cmp.on_config_done then
+    lvim.builtin.cmp.on_config_done(cmp)
+  end
 end
 
 return M