add condition to merge user custom plugins
This commit is contained in:
parent
6590372791
commit
7b3aefee53
@ -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
|
-- these are default mappings, check core.mappings for table structure
|
||||||
M.mappings = require "core.mappings"
|
M.mappings = require "core.mappings"
|
||||||
|
@ -221,11 +221,15 @@ local default_plugins = {
|
|||||||
require("which-key").setup(opts)
|
require("which-key").setup(opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ import = require("core.utils").load_config().plugins },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- load lazy.nvim _,opts
|
local config = require("core.utils").load_config()
|
||||||
local lazy_config = require "plugins.configs.lazy_nvim"
|
|
||||||
|
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)
|
require("lazy").setup(default_plugins, lazy_config)
|
||||||
|
Loading…
Reference in New Issue
Block a user