Skip to content

Commit

Permalink
Fix Plugin Override Function Capabilities
Browse files Browse the repository at this point in the history
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](NvChad#1239)
  • Loading branch information
endoze authored and reflog committed Aug 12, 2022
1 parent 5bcec91 commit a64d093
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/core/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a64d093

Please sign in to comment.