From 771046a7385b22eb544f64d7e72f324cfb29e215 Mon Sep 17 00:00:00 2001 From: a690700752 Date: Wed, 15 Jun 2022 20:11:53 +0800 Subject: [PATCH] feature: make override can be a function --- lua/core/utils.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 8d5bd29..59d771b 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -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