feature: make override can be a function

This commit is contained in:
a690700752 2022-06-15 20:11:53 +08:00 committed by siduck
parent 2091160434
commit 771046a738
1 changed files with 4 additions and 0 deletions

View File

@ -148,6 +148,10 @@ end
M.load_override = function(default_table, plugin_name)
local user_table = M.load_config().plugins.override[plugin_name]
if type(user_table) == "function" then
user_table = user_table()
end
if type(user_table) == "table" then
default_table = merge_tb("force", default_table, user_table)
else