From 6874ded13fdf7d7945ab5620098faac918f04363 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 14c265c9..b709c347 100644 --- a/lua/hop/init.lua +++ b/lua/hop/init.lua @@ -264,7 +264,7 @@ end M.opts = defaults 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}) -- Insert the highlights and register the autocommand if asked to. local highlight = require'hop.highlight'