fix(loader): when `config=true`, pass `nil` to `setup()`. Fixes #208

This commit is contained in:
Folke Lemaitre 2022-12-28 17:43:14 +01:00
parent 021e54655f
commit 5f423b29c6
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 5 additions and 1 deletions

View File

@ -217,7 +217,11 @@ function M.config(plugin)
mods = vim.tbl_values(mods)
if #mods == 1 then
fn = function()
require(mods[1]).setup(plugin.config == true and {} or plugin.config)
local opts = plugin.config
if opts == true then
opts = nil
end
require(mods[1]).setup(opts)
end
else
return Util.error(