Skip to content

Commit

Permalink
feat(startup): missing plugins will now install the versions in the l…
Browse files Browse the repository at this point in the history
…ockfile if available. Fixes #138
  • Loading branch information
folke committed Dec 30, 2022
1 parent 1283c2b commit 81ee02b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/lazy/core/loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions lua/lazy/manage/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand All @@ -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({
Expand Down

0 comments on commit 81ee02b

Please sign in to comment.