summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter/install.lua
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-03-07 16:43:32 +0100
committerKiyan <yazdani.kiyan@protonmail.com>2021-03-16 18:52:43 +0100
commitfcb6d74b6b24628cd1975a2f7c5d048bc73a9bab (patch)
tree72c183101df6c3f9ccab0792c32671ff7d2afae7 /lua/nvim-treesitter/install.lua
parent1f9ca9664b140b19b65af9ce710db697100fe887 (diff)
Make parsers that require "TSGenerateFromGrammar"
Diffstat (limited to 'lua/nvim-treesitter/install.lua')
-rw-r--r--lua/nvim-treesitter/install.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua
index bb03b13f..ff43bca9 100644
--- a/lua/nvim-treesitter/install.lua
+++ b/lua/nvim-treesitter/install.lua
@@ -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