mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
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)
This commit is contained in:
parent
a3b489680f
commit
fd2880e8bc
6 changed files with 337 additions and 351 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue