mirror of https://github.com/folke/lazy.nvim.git
fix(runner): only use Config.plugins when updated. Fixes #1560
This commit is contained in:
parent
804cae0a65
commit
97f4df0824
|
@ -85,9 +85,11 @@ function M.install(opts)
|
||||||
"plugin.docs",
|
"plugin.docs",
|
||||||
{
|
{
|
||||||
"wait",
|
"wait",
|
||||||
sync = function()
|
---@param runner Runner
|
||||||
|
sync = function(runner)
|
||||||
require("lazy.pkg").update()
|
require("lazy.pkg").update()
|
||||||
Plugin.load()
|
Plugin.load()
|
||||||
|
runner:update()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
"plugin.build",
|
"plugin.build",
|
||||||
|
@ -114,9 +116,11 @@ function M.update(opts)
|
||||||
"plugin.docs",
|
"plugin.docs",
|
||||||
{
|
{
|
||||||
"wait",
|
"wait",
|
||||||
sync = function()
|
---@param runner Runner
|
||||||
|
sync = function(runner)
|
||||||
require("lazy.pkg").update()
|
require("lazy.pkg").update()
|
||||||
Plugin.load()
|
Plugin.load()
|
||||||
|
runner:update()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
"plugin.build",
|
"plugin.build",
|
||||||
|
|
|
@ -49,7 +49,14 @@ function Runner.new(opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Runner:plugin(name)
|
function Runner:plugin(name)
|
||||||
return Config.plugins[name] or self._plugins[name]
|
return self._plugins[name]
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Update plugins
|
||||||
|
function Runner:update()
|
||||||
|
for name in pairs(self._plugins) do
|
||||||
|
self._plugins[name] = Config.plugins[name] or self._plugins[name]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Runner:start()
|
function Runner:start()
|
||||||
|
|
Loading…
Reference in New Issue