浏览代码

Fix loading cmp config after Packer install (#1524)

Chase Colman 3 年之前
父节点
当前提交
e93c6abab7
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      lua/plugins.lua

+ 6 - 0
lua/plugins.lua

@@ -38,6 +38,12 @@ return {
       "hrsh7th/cmp-path",
       "hrsh7th/cmp-path",
       "hrsh7th/cmp-nvim-lua",
       "hrsh7th/cmp-nvim-lua",
     },
     },
+    run = function()
+      -- cmp's config requires cmp to be installed to run the first time
+      if not lvim.builtin.cmp then
+        require("core.cmp").config()
+      end
+    end,
   },
   },
   {
   {
     "rafamadriz/friendly-snippets",
     "rafamadriz/friendly-snippets",