Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xzbdmw opened this issue May 2, 2024 · 1 comment · May be fixed by #1911
Open

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

xzbdmw opened this issue May 2, 2024 · 1 comment · May be fixed by #1911

Comments

@xzbdmw
Copy link

xzbdmw commented May 2, 2024

autocmd.subscribe({ 'InsertEnter' }, async.debounce_next_tick_by_keymap(on_insert_enter))

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 xzbdmw linked a pull request May 6, 2024 that will close this issue
@tomtomjhj
Copy link
Contributor

see also: #1935

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants