Make parsers that require "TSGenerateFromGrammar"

This commit is contained in:
Stephan Seitz 2021-03-07 16:43:32 +01:00 committed by Kiyan
parent 1f9ca9664b
commit fcb6d74b6b
2 changed files with 28 additions and 4 deletions

View file

@ -153,6 +153,8 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync,
end
local parser_lib_name = install_folder..path_sep..lang..".so"
generate_from_grammar = repo.requires_generate_from_grammar or generate_from_grammar
if generate_from_grammar and vim.fn.executable('tree-sitter') ~= 1 then
api.nvim_err_writeln('tree-sitter CLI not found: `tree-sitter` is not executable!')
return