mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 08:35:53 +02:00
feat(config): add option to disable the order check to warning message
This commit is contained in:
parent
0bbce1775b
commit
da3b5159df
1 changed files with 12 additions and 5 deletions
|
@ -229,11 +229,18 @@ function M.setup(opts)
|
||||||
local extras = find("^lazyvim%.plugins%.extras%.", true) or lazyvim_plugins
|
local extras = find("^lazyvim%.plugins%.extras%.", true) or lazyvim_plugins
|
||||||
local plugins = find("^plugins$") or math.huge
|
local plugins = find("^plugins$") or math.huge
|
||||||
if lazyvim_plugins ~= 1 or extras > plugins then
|
if lazyvim_plugins ~= 1 or extras > plugins then
|
||||||
vim.notify(
|
local msg = {
|
||||||
"The order of your `lazy.nvim` imports is incorrect:\n- `lazyvim.plugins` should be first\n- followed by any `lazyvim.plugins.extras`\n- and finally your own `plugins`",
|
"The order of your `lazy.nvim` imports is incorrect:",
|
||||||
"warn",
|
"- `lazyvim.plugins` should be first",
|
||||||
{ title = "LazyVim" }
|
"- followed by any `lazyvim.plugins.extras`",
|
||||||
)
|
"- and finally your own `plugins`",
|
||||||
|
"",
|
||||||
|
"If you think you know what you're doing, you can disable this check with:",
|
||||||
|
"```lua",
|
||||||
|
"vim.g.lazyvim_check_order = false",
|
||||||
|
"```",
|
||||||
|
}
|
||||||
|
vim.notify(table.concat(msg, "\n"), "warn", { title = "LazyVim" })
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue