diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2025-10-29 18:36:39 +0100 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2025-10-30 08:36:00 +0100 |
| commit | fd2880e8bc2c39eade94a4d329df3a14e603136d (patch) | |
| tree | 83e35388dbea6dd12d3294fc9e7d883f76a3a30d /lua | |
| parent | feat(scfg): update parser (diff) | |
| download | nvim-treesitter-fd2880e8bc2c39eade94a4d329df3a14e603136d.tar nvim-treesitter-fd2880e8bc2c39eade94a4d329df3a14e603136d.tar.gz nvim-treesitter-fd2880e8bc2c39eade94a4d329df3a14e603136d.tar.bz2 nvim-treesitter-fd2880e8bc2c39eade94a4d329df3a14e603136d.tar.lz nvim-treesitter-fd2880e8bc2c39eade94a4d329df3a14e603136d.tar.xz nvim-treesitter-fd2880e8bc2c39eade94a4d329df3a14e603136d.tar.zst nvim-treesitter-fd2880e8bc2c39eade94a4d329df3a14e603136d.zip | |
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)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/health.lua | 9 | ||||
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 2 |
2 files changed, 1 insertions, 10 deletions
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 |
