* Adjust empty line count

* Implement vim.api.nvim_create_autocmd (#844)

* Implement vim.api.nvim_create_autocmd

* Only use vim.api.nvim_create_autocmd on nighly

* Cleanup

* cleanup

* Rename autos.lua to autocmds.lua

* Fix forgot to rename autos to autocmds

* Remove legacy autocmd

* Add descriptions on autocmds

* Update descriptions on autocmds

* Update CmpStatus command to lua API (#922)

Signed-off-by: Micah Halter <micah@balena.io>

* Move highlights to nvim_set_hl lua API (#925)

Signed-off-by: Micah Halter <micah@balena.io>

* Add default to highlight

* Refactor autocmds

* fmt

* Improve performance

* Fix bug

* Improve matching logic
Fixes https://github.com/hrsh7th/nvim-cmp/discussions/954

* Fix format

* Improve performance
Fix #825

* Fix cmdline redraw bug

* Fix event

Co-authored-by: hrsh7th <>
Co-authored-by: zer09 <zer09@users.noreply.github.com>
Co-authored-by: Micah Halter <micah@mehalter.com>
This commit is contained in:
hrsh7th
2022-05-04 01:47:01 +09:00
committed by GitHub
parent bba6fb67fd
commit 5054c14490
11 changed files with 160 additions and 246 deletions

View File

@@ -1,3 +1,5 @@
local feedkeys = require('cmp.utils.feedkeys')
local async = {}
---@class cmp.AsyncThrottle
@@ -109,4 +111,19 @@ async.sync = function(runner, timeout)
end, 10, false)
end
---Wait and callback for next safe state.
async.debounce_safe_state = function(callback)
local running = false
return function()
if running then
return
end
running = true
feedkeys.call('', 'n', function()
running = false
callback()
end)
end
end
return async