summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--lua/nvim-treesitter/health.lua4
2 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index 40aba79c..8882a3ad 100644
--- a/README.md
+++ b/README.md
@@ -63,7 +63,7 @@ For more detailed information on setting these up, see ["Advanced setup"](#advan
## Requirements
-- Neovim latest stable version or [nightly](https://github.com/neovim/neovim#install-from-source)
+- **Neovim 0.7.0 or later** (latest [nightly](https://github.com/neovim/neovim#install-from-source) recommended)
- `tar` and `curl` in your path (or alternatively `git`)
- A C compiler in your path and libstdc++ installed ([Windows users please read this!](https://github.com/nvim-treesitter/nvim-treesitter/wiki/Windows-support)).
@@ -387,7 +387,7 @@ Once the parser is installed, you can update it (from the latest revision of the
Note that neither `:TSInstall` nor `:TSInstallFromGrammar` copy query files from the grammar repository.
If you want your installed grammar to be useful, you must manually [add query files](#adding-queries) to your local nvim-treesitter installation.
Note also that module functionality is only triggered if your language's filetype is correctly identified.
-If Neovim does not detect your language's filetype by default, you can use [Neovim's `vim.filetype.add()`](https://neovim.io/doc/user/lua.html#vim.filetype.add()) (0.7.0 and above) to add a custom detection rule.
+If Neovim does not detect your language's filetype by default, you can use [Neovim's `vim.filetype.add()`](https://neovim.io/doc/user/lua.html#vim.filetype.add()) to add a custom detection rule.
If you use a git repository for your parser and want to use a specific version, you can set the `revision` key
in the `install_info` table for you parser config.
diff --git a/lua/nvim-treesitter/health.lua b/lua/nvim-treesitter/health.lua
index 8cbe0db1..aa2b35b8 100644
--- a/lua/nvim-treesitter/health.lua
+++ b/lua/nvim-treesitter/health.lua
@@ -19,6 +19,10 @@ local NVIM_TREESITTER_MINIMUM_ABI = 13
local function install_health()
health_start "Installation"
+ if fn.has "nvim-0.7" == 0 then
+ health_error "Nvim-treesitter requires Neovim 0.7.0+"
+ end
+
if fn.executable "tree-sitter" == 0 then
health_warn(
"`tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar,"