Jelajahi Sumber

Fix loading cmp config after Packer install (#1524)

Chase Colman 3 tahun lalu
induk
melakukan
e93c6abab7
1 mengubah file dengan 6 tambahan dan 0 penghapusan
  1. 6 0
      lua/plugins.lua

+ 6 - 0
lua/plugins.lua

@@ -38,6 +38,12 @@ return {
       "hrsh7th/cmp-path",
       "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",