From e9344e5319b712e90cfe36521d4682f36aaaf297 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 10:10:34 +0200 Subject: [PATCH] docs: better error and ref to checkhealth for nvim-treesitter main --- NEWS.md | 2 ++ lua/lazyvim/plugins/treesitter.lua | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 4f3a0d34..050440b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,8 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo - configure **LSP** with the native `vim.lsp.config` - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` - migrated to [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter/tree/main) **main** branch + - with the new version, the `tree-sitter` cli is **required** to install parsers + - best to run `:checkhealth nvim_treesitter` after updating - replace `nvim-treesitter` incremental selection with `flash.nvim`, since it is no longer supported - enabled [blink.cmp](https://github.com/saghen/blink.cmp) **cmdline** completions - use **LSP** based folding when available (disable with `nvim-lspconfig.folds.enabled = false`) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 4b15ab87..d65ce551 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -51,7 +51,10 @@ return { ---@param opts TSConfig config = function(plugin, opts) if vim.fn.executable("tree-sitter") == 0 then - LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") + LazyVim.error({ + "**treesitter-main** requires the `tree-sitter` CLI executable to be installed.", + "Run `:checkhealth nvim_treesitter` for more information.", + }) return end if type(opts.ensure_installed) ~= "table" then