add back ability to remove plugins
This commit is contained in:
parent
36a25ded76
commit
95951c86a9
@ -26,6 +26,7 @@ M.ui = {
|
||||
|
||||
M.plugins = {
|
||||
override = {},
|
||||
remove = {},
|
||||
|
||||
options = {
|
||||
packer = {
|
||||
|
@ -92,6 +92,15 @@ M.load_ifExists = function(module)
|
||||
end
|
||||
end
|
||||
|
||||
-- remove plugins defined in chadrc
|
||||
M.remove_default_plugins = function(plugins)
|
||||
local removals = require("core.utils").load_config().plugins.remove or {}
|
||||
if not vim.tbl_isempty(removals) then
|
||||
for _, plugin in pairs(removals) do plugins[plugin] = nil end
|
||||
end
|
||||
return plugins
|
||||
end
|
||||
|
||||
-- merge default/user plugin tables
|
||||
|
||||
M.plugin_list = function(default_plugins)
|
||||
|
@ -222,6 +222,7 @@ local plugins = {
|
||||
},
|
||||
}
|
||||
|
||||
plugins = require("core.utils").remove_default_plugins(plugins)
|
||||
-- merge user plugin table & default plugin table
|
||||
plugins = require("core.utils").plugin_list(plugins)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user