mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 04:20:09 -04:00
Mark parsers with NPM dependency
This commit is contained in:
parent
fcb6d74b6b
commit
532a369b32
3 changed files with 43 additions and 17 deletions
|
|
@ -174,6 +174,19 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync,
|
|||
vim.list_extend(command_list, shell.select_download_commands(repo, project_name, cache_folder, revision))
|
||||
end
|
||||
if generate_from_grammar then
|
||||
if repo.generate_requires_npm then
|
||||
vim.list_extend(command_list, {
|
||||
{
|
||||
cmd = 'npm',
|
||||
info = 'Installing NPM dependencies of '..lang..' parser',
|
||||
err = 'Error during `npm install` (required for parser generation of '..lang..' with npm dependencies)',
|
||||
opts = {
|
||||
args = {'install'},
|
||||
cwd = compile_location
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
vim.list_extend(command_list, {
|
||||
{
|
||||
cmd = 'tree-sitter',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue