diff options
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/editor.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 014364e0..44014e83 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -131,14 +131,12 @@ impl Editor { .map(ToOwned::to_owned) .unwrap_or_default(); - let rt = tokio::runtime::Handle::current(); - rt.block_on(language_server.text_document_did_open( + tokio::spawn(language_server.text_document_did_open( doc.url().unwrap(), doc.version(), doc.text(), language_id, - )) - .unwrap(); + )); } let id = self.documents.insert(doc); @@ -162,9 +160,7 @@ impl Editor { .and_then(|language| language_servers.get(language)); if let Some(language_server) = language_server { - let rt = tokio::runtime::Handle::current(); - rt.block_on(language_server.text_document_did_close(doc.identifier())) - .unwrap(); + tokio::spawn(language_server.text_document_did_close(doc.identifier())); } // remove selection |