Skip to content

Commit 4ebb7b5

Browse files
misumisumisinglemancombat
authored andcommitted
fix(utils): Changed to be able to refer to default settings proposed in ayamir#972 (ayamir#973)
1 parent 41c1378 commit 4ebb7b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/modules/utils/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ end
257257
local function tbl_recursive_merge(dst, src)
258258
for key, value in pairs(src) do
259259
if type(dst[key]) == "table" and type(value) == "function" then
260-
dst[key] = value()
260+
dst[key] = value(dst[key])
261261
elseif type(dst[key]) == "table" and vim.tbl_islist(dst[key]) then
262262
vim.list_extend(dst[key], value)
263263
elseif type(dst[key]) == "table" and not vim.tbl_islist(dst[key]) then
@@ -322,7 +322,7 @@ function M.load_plugin(plugin_name, opts, vim_plugin, setup_callback)
322322
setup_callback(opts)
323323
-- Replace base config if the returned user config is a function
324324
elseif type(user_config) == "function" then
325-
local user_opts = user_config()
325+
local user_opts = user_config(opts)
326326
if type(user_opts) == "table" then
327327
setup_callback(user_opts)
328328
end

0 commit comments

Comments
 (0)