1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 16:10:05 +08:00
SpaceVim/bundle/plenary.nvim/lua/plenary/async/api.lua
2022-05-16 22:20:10 +08:00

15 lines
286 B
Lua
Vendored

local util = require "plenary.async.util"
return setmetatable({}, {
__index = function(t, k)
return function(...)
-- if we are in a fast event await the scheduler
if vim.in_fast_event() then
util.scheduler()
end
vim.api[k](...)
end
end,
})