From 2138c846be62fb8a1818bf5cb2c1871307d3bb1c Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 19 Jun 2022 13:38:29 -0400 Subject: [PATCH] Fix Plugin Override Function Capabilities In order to ensure that plugin configuration that is overridden with a function instead of a table is still merged with the default plugin configuration, this commit splits up the if/elseif/else statement in lua/core/utils.lua. This is necessary as we want to take the resulting table returned from the override function and merge it with the default_table before setting up the plugin. Fixes [this issue](https://github.com/NvChad/NvChad/issues/1239) --- lua/core/utils.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 62d838f..33545ee 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -151,7 +151,9 @@ M.load_override = function(default_table, plugin_name) if type(user_table) == "function" then user_table = user_table() - elseif type(user_table) == "table" then + end + + if type(user_table) == "table" then default_table = merge_tb("force", default_table, user_table) else default_table = default_table