Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(utils): Changed to be able to refer to default settings proposed … #973

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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