diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2021-04-01 11:37:07 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-04-01 21:10:47 +0200 |
| commit | c16a6c972b0b60d1070568181234ab66e7ea570a (patch) | |
| tree | 67feb504777230e1490202891d19b3bbcdbafa5c /lua/nvim-treesitter/install.lua | |
| parent | 0f9bdb0939db0e73daacaef78c5ff16bd76f9e81 (diff) | |
Check for node-js on :TSInstallFromGrammar
Ref: https://github.com/nvim-treesitter/nvim-treesitter/issues/1121#issuecomment-811755767
Diffstat (limited to 'lua/nvim-treesitter/install.lua')
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 7d491549..c1201af5 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -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! "' |
