diff --git a/lua/jquote/init.lua b/lua/jquote/init.lua index 106c9c0..50f8cfa 100644 --- a/lua/jquote/init.lua +++ b/lua/jquote/init.lua @@ -99,6 +99,11 @@ end function M.setup(user_options) user_options = user_options or {} M.options = vim.tbl_deep_extend("force", vim.deepcopy(defaults), user_options) + + -- Ensure quote_chars is never nil + if not M.options.quote_chars or #M.options.quote_chars == 0 then + M.options.quote_chars = vim.deepcopy(defaults.quote_chars) + end local map_opts = { desc = "JQuote: Swap quote characters",