mirror of https://github.com/folke/lazy.nvim.git
feat(startup): missing plugins will now install the versions in the lockfile if available. Fixes #138
This commit is contained in:
parent
1283c2b288
commit
81ee02b8f6
|
@ -40,7 +40,7 @@ function M.setup()
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
require("lazy.manage").install({ wait = true })
|
require("lazy.manage").install({ wait = true, lockfile = true })
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,6 +11,7 @@ local M = {}
|
||||||
---@field mode? string
|
---@field mode? string
|
||||||
---@field plugins? (LazyPlugin|string)[]
|
---@field plugins? (LazyPlugin|string)[]
|
||||||
---@field concurrency? number
|
---@field concurrency? number
|
||||||
|
---@field lockfile? boolean
|
||||||
|
|
||||||
---@param ropts RunnerOpts
|
---@param ropts RunnerOpts
|
||||||
---@param opts? ManagerOpts
|
---@param opts? ManagerOpts
|
||||||
|
@ -74,7 +75,7 @@ function M.install(opts)
|
||||||
return M.run({
|
return M.run({
|
||||||
pipeline = {
|
pipeline = {
|
||||||
"git.clone",
|
"git.clone",
|
||||||
"git.checkout",
|
{ "git.checkout", lockfile = opts.lockfile },
|
||||||
"plugin.docs",
|
"plugin.docs",
|
||||||
"wait",
|
"wait",
|
||||||
"plugin.build",
|
"plugin.build",
|
||||||
|
@ -88,7 +89,7 @@ function M.install(opts)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param opts? ManagerOpts|{lockfile?:boolean}
|
---@param opts? ManagerOpts
|
||||||
function M.update(opts)
|
function M.update(opts)
|
||||||
opts = M.opts(opts, { mode = "update" })
|
opts = M.opts(opts, { mode = "update" })
|
||||||
return M.run({
|
return M.run({
|
||||||
|
|
Loading…
Reference in New Issue