helix-mods/helix-term
Michael Davis 89efb4f711
lsp: Resolve completion item asynchronously on idle-timeout (#4781)
d7d0d5ffb7 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
tests Fix range offsets for multiple shell insertions (#4619) 2022-11-14 09:45:52 +09:00
.gitignore Initial import. 2020-05-20 18:14:51 +09:00
build.rs Resolve a bunch of upcoming clippy lints 2022-11-04 21:06:28 +09:00
Cargo.toml build(deps): bump once_cell from 1.15.0 to 1.16.0 (#4548) 2022-10-31 19:31:08 -05:00