From 12ee1e6b1d79fd1f26c45c31cc3f6402d4069fea Mon Sep 17 00:00:00 2001 From: Jeff Hertzler Date: Sat, 29 May 2021 12:25:12 -0400 Subject: [PATCH] don't error on empty invocation of setup calling like this `require('hop').setup()` instead of this `require('hop').setup{}` currently errors --- lua/hop/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/hop/init.lua b/lua/hop/init.lua index 93c8bc05..bec086dd 100644 --- a/lua/hop/init.lua +++ b/lua/hop/init.lua @@ -8,7 +8,7 @@ M.opts = defaults -- Setup user settings. function M.setup(opts) -- Look up keys in user-defined table with fallback to defaults. - M.opts = setmetatable(opts, {__index = defaults}) + M.opts = setmetatable(opts or {}, {__index = defaults}) end -- Allows to override global options with user local overrides.