Skip to content

Commit

Permalink
Avoid crashing with 2 instances of the same LSP (#9134)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgalopes committed Jan 2, 2024
1 parent 85fce2f commit 7fd266e
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 @@ -915,10 +915,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 7fd266e

Please sign in to comment.