diff options
author | Egor Karavaev | 2021-06-07 18:50:20 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-08 01:02:41 +0000 |
commit | 960bc9f13446e1fbcc36f1a3be3541ec1b9ec5bd (patch) | |
tree | f63b8e528c8bcf6c0efbd3577c14f66ec274fdd6 /helix-view/src | |
parent | 08f50310bd698aaab1c44b3c2b900648e98bfa5c (diff) |
Don't panic on LSP not starting
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/editor.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index b69ae22f..7af19a9b 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -155,7 +155,7 @@ impl Editor { let language_server = doc .language .as_ref() - .and_then(|language| self.language_servers.get(language)); + .and_then(|language| self.language_servers.get(language).ok()); if let Some(language_server) = language_server { doc.set_language_server(Some(language_server.clone())); @@ -196,7 +196,7 @@ impl Editor { let language_server = doc .language .as_ref() - .and_then(|language| language_servers.get(language)); + .and_then(|language| language_servers.get(language).ok()); if let Some(language_server) = language_server { tokio::spawn(language_server.text_document_did_close(doc.identifier())); } |