nvim-cmp icon indicating copy to clipboard operation
nvim-cmp copied to clipboard

cmp.core:prepare() is expansive and calls for every InsertEnter

Open xzbdmw opened this issue 9 months ago • 1 comments

https://github.com/hrsh7th/nvim-cmp/blob/8f3c541407e691af6163e2447f3af1bd6e17f9a3/lua/cmp/init.lua#L333 It calls cmp.core:prepare() for every InsertEnter and it takes 20ms to run that prepare function, which makes o become laggy. And it is not async as its name suggests, because if you put a heavy loop in on_insert_enter and type o editor will freeze.

xzbdmw avatar May 02 '24 20:05 xzbdmw