mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 12:56:46 +00:00
feat(build): build files and functions are now async. use coroutine.yield to interrupt and report progress
This commit is contained in:
parent
fcfd54835d
commit
368747bc9a
4 changed files with 102 additions and 38 deletions
|
@ -231,6 +231,18 @@ function M.markdown(msg, opts)
|
|||
)
|
||||
end
|
||||
|
||||
---@async
|
||||
---@param ms number
|
||||
function M.sleep(ms)
|
||||
local continue = false
|
||||
vim.defer_fn(function()
|
||||
continue = true
|
||||
end, ms)
|
||||
while not continue do
|
||||
coroutine.yield()
|
||||
end
|
||||
end
|
||||
|
||||
function M._dump(value, result)
|
||||
local t = type(value)
|
||||
if t == "number" or t == "boolean" then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue