1
0
mirror of https://github.com/helix-editor/helix synced 2024-11-10 10:34:45 +01:00
helix/helix-lsp
Michael Davis 89efb4f711
lsp: Resolve completion item asynchronously on idle-timeout (#4781)
d7d0d5ffb79b6f2e09c6ab8af6e112c41e6f73e8 resolves completion items on
the idle-timeout event. The `Completion::resolve_completion_item`
function blocks on the LSP request though, which blocks the compositor
and in turn blocks the event loop. So until the language server returns
the resolved completion item, Helix is unable to respond to keypresses
or other LSP messages.

This is typically ok since the resolution request is fast but for some
language servers this can be problematic, and ideally we shouldn't be
blocking like this anyways.

When receiving a `completionItem/resolve` request, the Volar server
sends a `workspace/configuration` request to Helix and blocks itself
on the response, leading to a deadlock. Eventually the resolve request
times out within Helix but Helix is locked up and unresponsive in that
window.

This change resolves the completion item without blocking the
compositor.
2022-11-19 03:27:46 +09:00
..
src lsp: Resolve completion item asynchronously on idle-timeout (#4781) 2022-11-19 03:27:46 +09:00
Cargo.toml build(deps): bump tokio-stream from 0.1.10 to 0.1.11 (#4341) 2022-10-17 19:56:29 -05:00