diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2021-06-03 00:04:39 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-06-03 14:24:25 +0200 |
| commit | 31f11258271d508b82446792924936a5fff7c85c (patch) | |
| tree | cc44152546e4f24f9342d2f2117bf67934f7393c /lua | |
| parent | Add regex injection for Elixir (diff) | |
| download | nvim-treesitter-31f11258271d508b82446792924936a5fff7c85c.tar nvim-treesitter-31f11258271d508b82446792924936a5fff7c85c.tar.gz nvim-treesitter-31f11258271d508b82446792924936a5fff7c85c.tar.bz2 nvim-treesitter-31f11258271d508b82446792924936a5fff7c85c.tar.lz nvim-treesitter-31f11258271d508b82446792924936a5fff7c85c.tar.xz nvim-treesitter-31f11258271d508b82446792924936a5fff7c85c.tar.zst nvim-treesitter-31f11258271d508b82446792924936a5fff7c85c.zip | |
Fix #1324: tree-sitter CLI requires node
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 7531cf3ab..9f5de3a38 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -602,7 +602,7 @@ function M.ft_to_lang(ft) end function M.available_parsers() - if vim.fn.executable('tree-sitter') == 1 then + if vim.fn.executable('tree-sitter') == 1 and vim.fn.executable('node') == 1 then return vim.tbl_keys(M.list) else return vim.tbl_filter(function(p) return not M.list[p].install_info.requires_generate_from_grammar end, @@ -611,7 +611,7 @@ function M.available_parsers() end function M.maintained_parsers() - local has_tree_sitter_cli = vim.fn.executable('tree-sitter') == 1 + local has_tree_sitter_cli = vim.fn.executable('tree-sitter') == 1 and vim.fn.executable('node') == 1 return vim.tbl_filter(function(lang) return M.list[lang].maintainers and (has_tree_sitter_cli or not M.list[lang].install_info.requires_generate_from_grammar) end, |
