add option for packerInit | fix (#715)

This commit is contained in:
siduck 2022-01-09 09:07:18 +05:30
parent ea6f2a1490
commit 71b710b35b
2 changed files with 5 additions and 2 deletions

View File

@ -72,6 +72,9 @@ M.plugins = {
autopairs = true,
},
options = {
packer = {
init_file = "plugins.packerInit",
},
autopairs = { loadAfter = "nvim-cmp" },
lspconfig = {
setup_lspconf = "", -- path of file containing setups of different lsps

View File

@ -1,4 +1,5 @@
local present, packer = pcall(require, "plugins.packerInit")
local plugin_settings = require("core.utils").load_config().plugins
local present, packer = pcall(require, plugin_settings.options.packer.init_file)
if not present then
return false
@ -7,7 +8,6 @@ end
local use = packer.use
return packer.startup(function()
local plugin_settings = require("core.utils").load_config().plugins
local override_req = require("core.utils").override_req
-- this is arranged on the basis of when a plugin starts