aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-treesitter/install.lua4
-rw-r--r--lua/nvim-treesitter/parsers.lua1
2 files changed, 4 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua
index 655e82a32..7380934e7 100644
--- a/lua/nvim-treesitter/install.lua
+++ b/lua/nvim-treesitter/install.lua
@@ -184,6 +184,10 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync,
end
if generate_from_grammar then
if repo.generate_requires_npm then
+ if not vim.fn.executable('npm') ~= 1 then
+ api.nvim_err_writeln('`'..lang..'` requires NPM to be installed from grammar.js')
+ return
+ end
vim.list_extend(command_list, {
{
cmd = 'npm',
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index 4cc34d176..4a021df01 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -433,7 +433,6 @@ list.jsdoc = {
install_info = {
url = "https://github.com/tree-sitter/tree-sitter-jsdoc",
files = { "src/parser.c" },
- requires_generate_from_grammar = true,
},
maintainers = {"@steelsojka"},
}