aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheLeoP <eugenio2305@hotmail.com>2023-06-15 06:43:05 -0500
committerChristian Clason <c.clason@uni-graz.at>2025-05-12 18:43:40 +0200
commitb4c9c81a80818dd6499e0777278b1c318d1aac9a (patch)
treed287a0c08c89f646fe7b9fb46e41abdcd13e0a76
parentfix: check queries in needs_update() (diff)
downloadnvim-treesitter-b4c9c81a80818dd6499e0777278b1c318d1aac9a.tar
nvim-treesitter-b4c9c81a80818dd6499e0777278b1c318d1aac9a.tar.gz
nvim-treesitter-b4c9c81a80818dd6499e0777278b1c318d1aac9a.tar.bz2
nvim-treesitter-b4c9c81a80818dd6499e0777278b1c318d1aac9a.tar.lz
nvim-treesitter-b4c9c81a80818dd6499e0777278b1c318d1aac9a.tar.xz
nvim-treesitter-b4c9c81a80818dd6499e0777278b1c318d1aac9a.tar.zst
nvim-treesitter-b4c9c81a80818dd6499e0777278b1c318d1aac9a.zip
fix: check if config has install_info in filter
-rw-r--r--lua/nvim-treesitter/parsers.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index a057498f4..026c8d1d6 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -3015,7 +3015,8 @@ function M.get_available(tier)
end
if vim.fn.executable('tree-sitter') == 0 or vim.fn.executable('node') == 0 then
parsers = vim.iter.filter(function(p)
- return not M.configs[p].install_info.requires_generate_from_grammar
+ return M.configs[p].install_info
+ and not M.configs[p].install_info.requires_generate_from_grammar
end, parsers) --[[@as string[] ]]
end
return parsers