mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-10 09:24:37 +02:00
feat(config): show an error when the needed version of lazy.nvim
is too old
This commit is contained in:
parent
48d1e8df12
commit
7b943822db
1 changed files with 13 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
|||
---@type LazyVimConfig
|
||||
local M = {}
|
||||
|
||||
M.lazy_version = ">=9.1.0"
|
||||
|
||||
---@class LazyVimConfig
|
||||
local defaults = {
|
||||
icons = {
|
||||
|
@ -60,6 +62,17 @@ local options
|
|||
---@param opts? LazyVimConfig
|
||||
function M.setup(opts)
|
||||
options = vim.tbl_deep_extend("force", defaults, opts or {})
|
||||
if not M.has() then
|
||||
require("lazy.core.util").error(
|
||||
"**LazyVim** needs **lazy.nvim** version "
|
||||
.. M.lazy_version
|
||||
.. " to work properly.\n"
|
||||
.. "Please upgrade **lazy.nvim**",
|
||||
{ title = "LazyVim" }
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
---@param range? string
|
||||
function M.has(range)
|
||||
local Semver = require("lazy.manage.semver")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue