feat(startup): missing plugins will now install the versions in the lockfile if available. Fixes #138

This commit is contained in:
Folke Lemaitre 2022-12-30 09:17:46 +01:00
parent 1283c2b288
commit 81ee02b8f6
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
2 changed files with 4 additions and 3 deletions

View File

@ -40,7 +40,7 @@ function M.setup()
break
end
end
require("lazy.manage").install({ wait = true })
require("lazy.manage").install({ wait = true, lockfile = true })
break
end
end

View File

@ -11,6 +11,7 @@ local M = {}
---@field mode? string
---@field plugins? (LazyPlugin|string)[]
---@field concurrency? number
---@field lockfile? boolean
---@param ropts RunnerOpts
---@param opts? ManagerOpts
@ -74,7 +75,7 @@ function M.install(opts)
return M.run({
pipeline = {
"git.clone",
"git.checkout",
{ "git.checkout", lockfile = opts.lockfile },
"plugin.docs",
"wait",
"plugin.build",
@ -88,7 +89,7 @@ function M.install(opts)
end)
end
---@param opts? ManagerOpts|{lockfile?:boolean}
---@param opts? ManagerOpts
function M.update(opts)
opts = M.opts(opts, { mode = "update" })
return M.run({