add condition to merge user custom plugins
This commit is contained in:
parent
861e9ed3ae
commit
b37a1bdee7
|
@ -74,7 +74,9 @@ M.ui = {
|
|||
},
|
||||
}
|
||||
|
||||
M.plugins = {}
|
||||
M.plugins = "" -- path i.e "custom.plugins" -> custom/plugins.lua only and not custom/plugins/init.lua!!!!
|
||||
|
||||
M.lazy_nvim = {} -- config for lazy.nvim startup options
|
||||
|
||||
-- these are default mappings, check core.mappings for table structure
|
||||
M.mappings = require "core.mappings"
|
||||
|
|
|
@ -221,11 +221,15 @@ local default_plugins = {
|
|||
require("which-key").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
{ import = require("core.utils").load_config().plugins },
|
||||
}
|
||||
|
||||
-- load lazy.nvim _,opts
|
||||
local lazy_config = require "plugins.configs.lazy_nvim"
|
||||
local config = require("core.utils").load_config()
|
||||
|
||||
if #config.plugins > 0 then
|
||||
table.insert(default_plugins, { import = config.plugins })
|
||||
end
|
||||
|
||||
-- lazy_nvim startup opts
|
||||
local lazy_config = vim.tbl_deep_extend("force", require "plugins.configs.lazy_nvim", config.lazy_nvim)
|
||||
|
||||
require("lazy").setup(default_plugins, lazy_config)
|
||||
|
|
Loading…
Reference in New Issue