From 5f423b29c65f536a9c41a34a8328372baa444da5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 28 Dec 2022 17:43:14 +0100 Subject: [PATCH] fix(loader): when `config=true`, pass `nil` to `setup()`. Fixes #208 --- lua/lazy/core/loader.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index fa132d2..2d5d493 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -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(