From fd2880e8bc2c39eade94a4d329df3a14e603136d Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 29 Oct 2025 18:36:39 +0100 Subject: feat(install): remove node requirement * supported parsers _must_ commit at least `grammar.json` * set `TREE_SITTER_JS_RUNTIME=native` when generating parser to use built-in quickjs instead of node (requires tree-sitter 0.26) --- lua/nvim-treesitter/health.lua | 9 --------- lua/nvim-treesitter/install.lua | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/health.lua b/lua/nvim-treesitter/health.lua index 3da7f5415..08ec42bb7 100644 --- a/lua/nvim-treesitter/health.lua +++ b/lua/nvim-treesitter/health.lua @@ -65,15 +65,6 @@ local function install_health() end end - do -- node check - local node = check_exe('node') - if node then - health.ok(string.format('node %s (%s)', node.version, node.path)) - else - health.error('node not found') - end - end - do -- curl+tar check local tar = check_exe('tar') if tar then diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 29c91356c..94d21d46a 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -182,7 +182,7 @@ local function do_generate(logger, repo, compile_location) '--abi', tostring(vim.treesitter.language_version), from_json and 'src/grammar.json' or nil, - }, { cwd = compile_location }) + }, { cwd = compile_location, env = { TREE_SITTER_JS_RUNTIME = 'native' } }) if r.code > 0 then return logger:error('Error during "tree-sitter generate": %s', r.stderr) end -- cgit v1.2.3-70-g09d2