Skip to content

Commit

Permalink
fix(loader): when config=true, pass nil to setup(). Fixes #208
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 28, 2022
1 parent 021e546 commit 5f423b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/lazy/core/loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5f423b2

Please sign in to comment.