mirror of https://github.com/folke/lazy.nvim.git
feat: config option install_missing=true
This commit is contained in:
parent
3ec5a2ce4c
commit
9be3d3d840
|
@ -25,25 +25,25 @@ function M.setup(opts)
|
||||||
Plugin.load()
|
Plugin.load()
|
||||||
Util.track()
|
Util.track()
|
||||||
|
|
||||||
Util.track("install")
|
if Config.options.install_missing then
|
||||||
for _, plugin in pairs(Config.plugins) do
|
Util.track("install")
|
||||||
if not plugin._.installed then
|
for _, plugin in pairs(Config.plugins) do
|
||||||
vim.cmd("do User LazyInstallPre")
|
if not plugin._.installed then
|
||||||
require("lazy.manage").install({
|
vim.cmd("do User LazyInstallPre")
|
||||||
wait = true,
|
require("lazy.manage").install({
|
||||||
show = Config.options.interactive,
|
wait = true,
|
||||||
})
|
show = Config.options.interactive,
|
||||||
break
|
})
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Util.track()
|
||||||
end
|
end
|
||||||
Util.track()
|
|
||||||
|
|
||||||
Util.track("loader")
|
Util.track("loader")
|
||||||
Loader.setup()
|
Loader.setup()
|
||||||
Util.track()
|
Util.track()
|
||||||
|
|
||||||
Util.track() -- end setup
|
|
||||||
|
|
||||||
local lazy_delta = vim.loop.hrtime() - cache_start
|
local lazy_delta = vim.loop.hrtime() - cache_start
|
||||||
|
|
||||||
Loader.init_plugins()
|
Loader.init_plugins()
|
||||||
|
@ -53,6 +53,7 @@ function M.setup(opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.cmd("do User LazyDone")
|
vim.cmd("do User LazyDone")
|
||||||
|
Util.track() -- end setup
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.stats()
|
function M.stats()
|
||||||
|
|
Loading…
Reference in New Issue