mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-20 10:44:54 +02:00
feat: show error and exit Neovim when version is too old
This commit is contained in:
parent
9935dc3944
commit
2aea5c7210
1 changed files with 15 additions and 0 deletions
|
@ -89,6 +89,21 @@ local options
|
|||
---@param opts? LazyVimConfig
|
||||
function M.setup(opts)
|
||||
options = vim.tbl_deep_extend("force", defaults, opts or {})
|
||||
|
||||
if vim.fn.has("nvim-0.9.0") == 0 then
|
||||
vim.api.nvim_echo({
|
||||
{
|
||||
"LazyVim requires Neovim >= 0.9.0\n",
|
||||
"ErrorMsg",
|
||||
},
|
||||
{ "Press any key to exit", "MoreMsg" },
|
||||
}, true, {})
|
||||
|
||||
vim.fn.getchar()
|
||||
vim.cmd([[quit]])
|
||||
return
|
||||
end
|
||||
|
||||
if not M.has() then
|
||||
require("lazy.core.util").error(
|
||||
"**LazyVim** needs **lazy.nvim** version "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue