mirror of https://github.com/folke/lazy.nvim.git
fix(checker): make sure we show logs when only doing a fast check
This commit is contained in:
parent
96d759d1cb
commit
4008b57d88
|
@ -13,7 +13,13 @@ M.reported = {}
|
||||||
|
|
||||||
function M.start()
|
function M.start()
|
||||||
M.fast_check()
|
M.fast_check()
|
||||||
M.schedule()
|
if M.schedule() > 0 then
|
||||||
|
Manage.log({
|
||||||
|
show = false,
|
||||||
|
check = true,
|
||||||
|
concurrency = Config.options.checker.concurrency,
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.schedule()
|
function M.schedule()
|
||||||
|
@ -21,6 +27,7 @@ function M.schedule()
|
||||||
local next_check = State.checker.last_check + Config.options.checker.frequency - os.time()
|
local next_check = State.checker.last_check + Config.options.checker.frequency - os.time()
|
||||||
next_check = math.max(next_check, 0)
|
next_check = math.max(next_check, 0)
|
||||||
vim.defer_fn(M.check, next_check * 1000)
|
vim.defer_fn(M.check, next_check * 1000)
|
||||||
|
return next_check
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param opts? {report:boolean} report defaults to true
|
---@param opts? {report:boolean} report defaults to true
|
||||||
|
|
|
@ -136,13 +136,13 @@ function M.check(opts)
|
||||||
}, opts)
|
}, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param opts? ManagerOpts
|
---@param opts? ManagerOpts | {check?:boolean}
|
||||||
function M.log(opts)
|
function M.log(opts)
|
||||||
opts = M.opts(opts, { mode = "log" })
|
opts = M.opts(opts, { mode = "log" })
|
||||||
return M.run({
|
return M.run({
|
||||||
pipeline = {
|
pipeline = {
|
||||||
{ "git.origin", check = true },
|
{ "git.origin", check = true },
|
||||||
"git.log",
|
{ "git.log", check = opts.check },
|
||||||
},
|
},
|
||||||
plugins = function(plugin)
|
plugins = function(plugin)
|
||||||
return plugin.url and plugin._.installed
|
return plugin.url and plugin._.installed
|
||||||
|
|
Loading…
Reference in New Issue