From 96316e5a69b4cc45311f5b7225e7d7bea1f977ee Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 17:17:21 +0200 Subject: [PATCH] fix(treesitter-main): move exe check to config --- lua/lazyvim/plugins/extras/ui/treesitter-main.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua index 934d311a..8987b732 100644 --- a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua +++ b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua @@ -6,16 +6,13 @@ return { build = ":TSUpdate", lazy = true, cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, - enabled = function() - if vim.fn.executable("tree-sitter") == 0 then - LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") - return false - end - return true - end, init = function() end, ---@param opts TSConfig config = function(_, opts) + if vim.fn.executable("tree-sitter") == 0 then + LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") + return + end if type(opts.ensure_installed) ~= "table" then error("opts.ensure_installed must be a table") end