mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
fix(plugin): show warning of removed core plugin when trying to load them without having the extra
This commit is contained in:
parent
777be2fabd
commit
b9f3cada8a
1 changed files with 18 additions and 0 deletions
|
@ -14,6 +14,12 @@ M.deprecated_extras = {
|
|||
["lazyvim.plugins.extras.ui.dashboard"] = "`dashboard.nvim` is now the default **LazyVim** starter.",
|
||||
}
|
||||
|
||||
M.deprecated_modules = {
|
||||
["null-ls"] = "lsp.none-ls",
|
||||
["nvim-navic.lib"] = "editor.navic",
|
||||
["nvim-navic"] = "editor.navic",
|
||||
}
|
||||
|
||||
---@type table<string, string>
|
||||
M.renames = {
|
||||
["windwp/nvim-spectre"] = "nvim-pack/nvim-spectre",
|
||||
|
@ -26,6 +32,18 @@ function M.setup()
|
|||
M.fix_imports()
|
||||
M.fix_renames()
|
||||
M.lazy_file()
|
||||
table.insert(package.loaders, function(module)
|
||||
if M.deprecated_modules[module] then
|
||||
Util.warn(
|
||||
("`%s` is no longer included by default in **LazyVim**.\nPlease install the `%s` extra if you still want to use it."):format(
|
||||
module,
|
||||
M.deprecated_modules[module]
|
||||
),
|
||||
{ title = "LazyVim" }
|
||||
)
|
||||
return function() end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function M.extra_idx(name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue