1
0
Fork 0
mirror of https://github.com/helix-editor/helix synced 2024-05-17 02:46:06 +02:00

Handle partial failure when sending textDocument/didSave (#10168)

This commit is contained in:
Michael Davis 2024-04-06 00:38:51 -04:00 committed by GitHub
parent d3bfa3e063
commit 3f2de21342
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -961,13 +961,14 @@ impl Future<Output = Result<DocumentSavedEvent, anyhow::Error>> + 'static + Send
for (_, language_server) in language_servers { for (_, language_server) in language_servers {
if !language_server.is_initialized() { if !language_server.is_initialized() {
return Ok(event); continue;
} }
if let Some(identifier) = &identifier { if let Some(notification) = identifier
if let Some(notification) = .clone()
language_server.text_document_did_save(identifier.clone(), &text) .and_then(|id| language_server.text_document_did_save(id, &text))
{ {
notification.await?; if let Err(err) = notification.await {
log::error!("Failed to send textDocument/didSave: {err}");
} }
} }
} }