summaryrefslogtreecommitdiff
path: root/helix-lsp
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-12-03 01:05:27 +0000
committerBlaž Hrastnik2021-12-03 01:05:27 +0000
commitd31bef7fea1aa0cc9455cf082825ccff9614ed5e (patch)
tree2ff50072d87d6ff034b7a9c0f3206cbfb375c771 /helix-lsp
parent01f7a312d0bdf53184fb579bf41c619230449cce (diff)
lsp: Don't panic if init fails
We correctly filter out the language server inside Document to ignore it if the capabilities are missing, so this way it'll simply ignore the errored out LSP rather than panicking.
Diffstat (limited to 'helix-lsp')
-rw-r--r--helix-lsp/src/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs
index 7fa65928..15cae582 100644
--- a/helix-lsp/src/lib.rs
+++ b/helix-lsp/src/lib.rs
@@ -337,7 +337,10 @@ impl Registry {
})
.await;
- value.expect("failed to initialize capabilities");
+ if let Err(e) = value {
+ log::error!("failed to initialize language server: {}", e);
+ return;
+ }
// next up, notify<initialized>
_client