Skip to content

Commit 9be3d3d

Browse files
committed
feat: config option install_missing=true
1 parent 3ec5a2c commit 9be3d3d

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

lua/lazy/init.lua

+13-12
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ function M.setup(opts)
2525
Plugin.load()
2626
Util.track()
2727

28-
Util.track("install")
29-
for _, plugin in pairs(Config.plugins) do
30-
if not plugin._.installed then
31-
vim.cmd("do User LazyInstallPre")
32-
require("lazy.manage").install({
33-
wait = true,
34-
show = Config.options.interactive,
35-
})
36-
break
28+
if Config.options.install_missing then
29+
Util.track("install")
30+
for _, plugin in pairs(Config.plugins) do
31+
if not plugin._.installed then
32+
vim.cmd("do User LazyInstallPre")
33+
require("lazy.manage").install({
34+
wait = true,
35+
show = Config.options.interactive,
36+
})
37+
break
38+
end
3739
end
40+
Util.track()
3841
end
39-
Util.track()
4042

4143
Util.track("loader")
4244
Loader.setup()
4345
Util.track()
4446

45-
Util.track() -- end setup
46-
4747
local lazy_delta = vim.loop.hrtime() - cache_start
4848

4949
Loader.init_plugins()
@@ -53,6 +53,7 @@ function M.setup(opts)
5353
end
5454

5555
vim.cmd("do User LazyDone")
56+
Util.track() -- end setup
5657
end
5758

5859
function M.stats()

0 commit comments

Comments
 (0)