Skip to content

Commit

Permalink
Avoid crashing with 2 instances of the same LSP (helix-editor#9134)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgalopes authored and Schuyler Mortimer committed Jul 10, 2024
1 parent c1e422e commit eecc550
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions helix-lsp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -919,10 +919,17 @@ fn start_client(
}

// next up, notify<initialized>
_client
let notification_result = _client
.notify::<lsp::notification::Initialized>(lsp::InitializedParams {})
.await
.unwrap();
.await;

if let Err(e) = notification_result {
log::error!(
"failed to notify language server of its initialization: {}",
e
);
return;
}

initialize_notify.notify_one();
});
Expand Down

0 comments on commit eecc550

Please sign in to comment.