mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(config): show warning if user config contains renamed references
This commit is contained in:
parent
d5132b51bc
commit
c3f7160721
1 changed files with 8 additions and 0 deletions
|
|
@ -183,6 +183,14 @@ function M.init()
|
||||||
local add = Plugin.Spec.add
|
local add = Plugin.Spec.add
|
||||||
Plugin.Spec.add = function(self, plugin, ...)
|
Plugin.Spec.add = function(self, plugin, ...)
|
||||||
if type(plugin) == "table" and M.renames[plugin[1]] then
|
if type(plugin) == "table" and M.renames[plugin[1]] then
|
||||||
|
require("lazy.core.util").warn(
|
||||||
|
("Plugin `%s` was renamed to `%s`.\nPlease update your config for `%s`"):format(
|
||||||
|
plugin[1],
|
||||||
|
M.renames[plugin[1]],
|
||||||
|
self.importing or "LazyVim"
|
||||||
|
),
|
||||||
|
{ title = "LazyVim" }
|
||||||
|
)
|
||||||
plugin[1] = M.renames[plugin[1]]
|
plugin[1] = M.renames[plugin[1]]
|
||||||
end
|
end
|
||||||
return add(self, plugin, ...)
|
return add(self, plugin, ...)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue