From 0eef2c2f29cc95b6a3da8c9dced215acf60147dc Mon Sep 17 00:00:00 2001 From: alexander-born <61082865+alexander-born@users.noreply.github.com> Date: Mon, 20 Feb 2023 15:58:52 +0100 Subject: [PATCH] fix(treesitter): nil check #312 (#313) Co-authored-by: Alexander Born --- lua/lazyvim/plugins/treesitter.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 83eb574b..d722b196 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -14,7 +14,8 @@ return { local enabled = false if opts.textobjects then for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do - if opts.textobjects[mod].enable then + local textobjects_opts = opts.textobjects[mod] + if textobjects_opts ~= nil and textobjects_opts.enable then enabled = true break end