Skip to content

Commit 76d6274

Browse files
authored
Revert "fix: support overwrite when merge config. (#1394)" (#1404)
This reverts commit 7056741. Sorry for the noise but I'm a lil confused about this new option...? Like idk if the performance difference between these two is even that big, and maybe it's not actually working as expected?
1 parent d58bf9a commit 76d6274

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

lua/modules/configs/ui/edgy.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ return function()
7272
filter = trouble_filter("right"),
7373
},
7474
},
75-
}, false, nil, true)
75+
})
7676
end

lua/modules/utils/init.lua

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,7 @@ end
320320
---@param opts nil|table @The default config to be merged with
321321
---@param vim_plugin? boolean @If this plugin is written in vimscript or not
322322
---@param setup_callback? function @Add new callback if the plugin needs unusual setup function
323-
---@param overwrite? boolean @If load user table-type config by overwriting
324-
function M.load_plugin(plugin_name, opts, vim_plugin, setup_callback, overwrite)
323+
function M.load_plugin(plugin_name, opts, vim_plugin, setup_callback)
325324
vim_plugin = vim_plugin or false
326325

327326
-- Get the file name of the default config
@@ -354,11 +353,7 @@ function M.load_plugin(plugin_name, opts, vim_plugin, setup_callback, overwrite)
354353
if ok then
355354
-- Extend base config if the returned user config is a table
356355
if type(user_config) == "table" then
357-
if overwrite == true then
358-
opts = vim.tbl_deep_extend("force", opts, user_config)
359-
else
360-
opts = tbl_recursive_merge(opts, user_config)
361-
end
356+
opts = tbl_recursive_merge(opts, user_config)
362357
setup_callback(opts)
363358
-- Replace base config if the returned user config is a function
364359
elseif type(user_config) == "function" then

0 commit comments

Comments
 (0)