Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
fix(utils): Changed to be able to refer to default settings proposed in
Browse files Browse the repository at this point in the history
  • Loading branch information
misumisumi authored and leavers committed Aug 31, 2023
1 parent 1a00161 commit e177e86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/modules/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ end
local function tbl_recursive_merge(dst, src)
for key, value in pairs(src) do
if type(dst[key]) == "table" and type(value) == "function" then
dst[key] = value()
dst[key] = value(dst[key])
elseif type(dst[key]) == "table" and vim.tbl_islist(dst[key]) then
vim.list_extend(dst[key], value)
elseif type(dst[key]) == "table" and not vim.tbl_islist(dst[key]) then
Expand Down Expand Up @@ -322,7 +322,7 @@ function M.load_plugin(plugin_name, opts, vim_plugin, setup_callback)
setup_callback(opts)
-- Replace base config if the returned user config is a function
elseif type(user_config) == "function" then
local user_opts = user_config()
local user_opts = user_config(opts)
if type(user_opts) == "table" then
setup_callback(user_opts)
end
Expand Down

0 comments on commit e177e86

Please sign in to comment.