Skip to content

Commit

Permalink
feat: config option install_missing=true
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 29, 2022
1 parent 3ec5a2c commit 9be3d3d
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions lua/lazy/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ function M.setup(opts)
Plugin.load()
Util.track()

Util.track("install")
for _, plugin in pairs(Config.plugins) do
if not plugin._.installed then
vim.cmd("do User LazyInstallPre")
require("lazy.manage").install({
wait = true,
show = Config.options.interactive,
})
break
if Config.options.install_missing then
Util.track("install")
for _, plugin in pairs(Config.plugins) do
if not plugin._.installed then
vim.cmd("do User LazyInstallPre")
require("lazy.manage").install({
wait = true,
show = Config.options.interactive,
})
break
end
end
Util.track()
end
Util.track()

Util.track("loader")
Loader.setup()
Util.track()

Util.track() -- end setup

local lazy_delta = vim.loop.hrtime() - cache_start

Loader.init_plugins()
Expand All @@ -53,6 +53,7 @@ function M.setup(opts)
end

vim.cmd("do User LazyDone")
Util.track() -- end setup
end

function M.stats()
Expand Down

0 comments on commit 9be3d3d

Please sign in to comment.