diff options
author | Blaž Hrastnik | 2021-05-06 06:08:59 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-05-06 06:08:59 +0000 |
commit | d00414f81a49501277642868c2cf76eefeb0db6b (patch) | |
tree | 8a69627dec819bab1e8f7a7db78227c52bb5f4a8 /helix-term/src/commands.rs | |
parent | 1ad0581ddd2d1fc6eb8b96b495eb4e546d4bdd28 (diff) |
Start moving more LSP calls into callbacks/futures without capturing self
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r-- | helix-term/src/commands.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 3292d39f..1e53d010 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1790,12 +1790,12 @@ pub fn completion(cx: &mut Context) { ); // TODO: handle fails - let res = block_on(language_server.completion(doc.identifier(), pos)).unwrap(); + let future = language_server.completion(doc.identifier(), pos); let trigger_offset = doc.selection(view.id).cursor(); cx.callback( - res, + future, move |editor: &mut Editor, compositor: &mut Compositor, response: Option<lsp::CompletionResponse>| { |