From cfac3c9a85526ad7406f9b246097a1ec4fa1a2c3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 14:07:49 +0200 Subject: [PATCH] fix(core): check for outdated nightly. See #6458 --- lua/lazyvim/plugins/init.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 7797b047..4ba9b36d 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -1,9 +1,20 @@ +local fail = nil if vim.fn.has("nvim-0.11.2") == 0 then - vim.api.nvim_echo({ + fail = { { "LazyVim requires Neovim >= 0.11.2\n", "ErrorMsg" }, { "For more info, see: https://github.com/LazyVim/LazyVim/issues/6421\n", "Comment" }, { "Press any key to exit", "MoreMsg" }, - }, true, {}) + } +elseif vim.fn.has("nvim-0.12") == 1 and not vim.lsp.is_enabled then + fail = { + { "LazyVim requires Neovim >= 0.11.2 or a recent Nightly\n", "ErrorMsg" }, + { "Your nightly is too old, please update to a more recent version.\n", "Comment" }, + { "Press any key to exit", "MoreMsg" }, + } +end + +if fail then + vim.api.nvim_echo(fail, true, {}) vim.fn.getchar() vim.cmd([[quit]]) return {}