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

Asynchronous Completion for isIncomplete Items in coc.nvim #5028

Open
hexh250786313 opened this issue May 31, 2024 · 0 comments · May be fixed by #5029
Open

Asynchronous Completion for isIncomplete Items in coc.nvim #5028

hexh250786313 opened this issue May 31, 2024 · 0 comments · May be fixed by #5029

Comments

@hexh250786313
Copy link
Contributor

In the current implementation of coc.nvim, when there are isIncomplete items in the completion panel, the entire panel is blocked waiting for the completion results of these isIncomplete items. During this time, even if the user has other inputs, the completion panel will not update because it is completely blocked.

This behavior is not very user-friendly, as the completion results for isIncomplete items may be slow, leading to a poor experience with the entire completion panel. I suggest that for these isIncomplete items, completion should be performed asynchronously in the background. The completion panel can then be updated once their completion results are returned, rather than blocking the entire panel.

Meanwhile, other non-isIncomplete items should be able to display their results immediately, instead of being blocked along with the isIncomplete items.

20240531_145749.mp4

As can be seen from the screenshot above, when I input s and remove it, the entire completion panel updates very slowly, it is completely blocked by the [Cop] completion source. In this example, the [A] completion source should not wait for the results of [Cop], it should update immediately when s changes, and then update the entire completion panel again after the results of [Cop] are returned.

@hexh250786313 hexh250786313 linked a pull request May 31, 2024 that will close this issue
fannheyward added a commit that referenced this issue Dec 18, 2024
Related #5028

A better way is adding a languageID pattern in languageserver/extension configuration, but this needs pass through more layers, needs more works, just made this quickfix for now.
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.

1 participant