mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
refactor: async processes
This commit is contained in:
parent
4319846b8c
commit
a36ebd2a75
12 changed files with 394 additions and 379 deletions
|
@ -51,7 +51,7 @@ function M:update()
|
|||
if plugin._.tasks then
|
||||
for _, task in ipairs(plugin._.tasks) do
|
||||
self.progress.total = self.progress.total + 1
|
||||
if not task:is_running() then
|
||||
if not task:running() then
|
||||
self.progress.done = self.progress.done + 1
|
||||
end
|
||||
end
|
||||
|
@ -356,7 +356,7 @@ end
|
|||
function M:diagnostics(plugin)
|
||||
local skip = false
|
||||
for _, task in ipairs(plugin._.tasks or {}) do
|
||||
if task:is_running() then
|
||||
if task:running() then
|
||||
self:diagnostic({
|
||||
severity = vim.diagnostic.severity.WARN,
|
||||
message = task.name .. (task:status() and (": " .. task:status()) or ""),
|
||||
|
|
|
@ -28,7 +28,7 @@ return {
|
|||
return true
|
||||
end
|
||||
return has_task(plugin, function(task)
|
||||
return task:is_running()
|
||||
return task:running()
|
||||
end)
|
||||
end,
|
||||
title = "Working",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue