From 079c685831fd64ab139b8824db54e76b04724346 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Feb 2023 16:01:02 +0100 Subject: [PATCH] refactor(treesitter): nil-check --- lua/lazyvim/plugins/treesitter.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index d722b196..73fca6ad 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -14,8 +14,7 @@ return { local enabled = false if opts.textobjects then for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do - local textobjects_opts = opts.textobjects[mod] - if textobjects_opts ~= nil and textobjects_opts.enable then + if opts.textobjects[mod] and opts.textobjects[mod].enable then enabled = true break end