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 postsolar committed Apr 20, 2024
1 parent b9dc64e commit fe8bc18
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions helix-view/src/document.rs
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 fe8bc18

Please sign in to comment.