Skip to content

Commit

Permalink
Handle partial failure when sending textDocument/didSave (helix-edito…
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis authored and Vulpesx committed Jun 7, 2024
1 parent e83d8a5 commit 835a249
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions helix-view/src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -961,13 +961,14 @@ impl Document {

for (_, language_server) in language_servers {
if !language_server.is_initialized() {
return Ok(event);
continue;
}
if let Some(identifier) = &identifier {
if let Some(notification) =
language_server.text_document_did_save(identifier.clone(), &text)
{
notification.await?;
if let Some(notification) = identifier
.clone()
.and_then(|id| language_server.text_document_did_save(id, &text))
{
if let Err(err) = notification.await {
log::error!("Failed to send textDocument/didSave: {err}");
}
}
}
Expand Down

0 comments on commit 835a249

Please sign in to comment.