This commit is contained in:
hrsh7th
2022-12-27 15:53:05 +09:00
parent a9c701fa7e
commit e55033fce4
2 changed files with 11 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
local feedkeys = require('cmp.utils.feedkeys')
local async = {}
---@class cmp.AsyncThrottle
@@ -138,4 +140,11 @@ async.debounce_next_tick = function(callback)
end
end
---Wait and callback for consuming next keymap.
async.debounce_next_tick_by_keymap = function(callback)
return function()
feedkeys.call('', '', callback)
end
end
return async