Check for node-js on :TSInstallFromGrammar

Ref: https://github.com/nvim-treesitter/nvim-treesitter/issues/1121#issuecomment-811755767
This commit is contained in:
Stephan Seitz 2021-04-01 11:37:07 +02:00 committed by Stephan Seitz
parent 0f9bdb0939
commit c16a6c972b
2 changed files with 14 additions and 0 deletions

View file

@ -169,6 +169,9 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync,
end
return
end
if generate_from_grammar and vim.fn.executable('node') ~= 1 then
api.nvim_err_writeln('node JS not found: `node` is not executable!')
end
local cc = shell.select_executable(M.compilers)
if not cc then
api.nvim_err_writeln('No C compiler found! "'