From d00414f81a49501277642868c2cf76eefeb0db6b Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 6 May 2021 15:08:59 +0900 Subject: Start moving more LSP calls into callbacks/futures without capturing self --- helix-term/src/commands.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helix-term') 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| { -- cgit v1.2.3-70-g09d2