This commit is contained in:
siduck 2022-06-28 11:11:11 +05:30
parent 6ff356ae93
commit 519a2df1a0

View File

@ -144,19 +144,12 @@ M.merge_plugins = function(default_plugins)
return final_table return final_table
end end
M.load_override = function(default_table, plugin_name) M.load_override = function(default_table, plugin_name)
local user_table = M.load_config().plugins.override[plugin_name] local user_table = M.load_config().plugins.override[plugin_name] or {}
user_table = type(user_table) == "table" and user_table or user_table()
if type(user_table) == "function" then return user_table and merge_tb("force", default_table, user_table)
user_table = user_table()
end
if type(user_table) == "table" then
default_table = merge_tb("force", default_table, user_table)
else
default_table = default_table
end
return default_table
end end
M.packer_sync = function(...) M.packer_sync = function(...)