@@ -490,11 +490,11 @@ impl Client {
490490
491491 // will_save / will_save_wait_until
492492
493− pub async fn text_document_did_save(
493+ pub fn text_document_did_save(
494494 &self,
495495 text_document: lsp::TextDocumentIdentifier,
496496 text: &Rope,
497− ) -> Result<()> {
497+ ) -> Option<impl Future<Output = Result<()>>> {
498498 let capabilities = self.capabilities.get().unwrap();
499499
500500 let include_text = match &capabilities.text_document_sync {
@@ -507,17 +507,18 @@ impl Client {
507507 include_text,
508508 }) => include_text.unwrap_or(false),
509509 // Supported(false)
510− _ => return Ok(()),
510+ _ => return None,
511511 },
512512 // unsupported
513− _ => return Ok(()),
513+ _ => return None,
514514 };
515515
516− self.notify::<lsp::notification::DidSaveTextDocument>(lsp::DidSaveTextDocumentParams {
517− text_document,
518− text: include_text.then(|| text.into()),
519− })
520− .await
516+ Some(self.notify::<lsp::notification::DidSaveTextDocument>(
517+ lsp::DidSaveTextDocumentParams {
518+ text_document,
519+ text: include_text.then(|| text.into()),
520+ },
521+ ))
521522 }
522523
523524 pub fn completion(