|
|
@ -471,11 +471,16 @@ impl Document {
|
|
|
|
let mut file = File::create(path).await?;
|
|
|
|
let mut file = File::create(path).await?;
|
|
|
|
to_writer(&mut file, encoding, &text).await?;
|
|
|
|
to_writer(&mut file, encoding, &text).await?;
|
|
|
|
|
|
|
|
|
|
|
|
if let Some(notification) = language_server.and_then(|language_server| {
|
|
|
|
if let Some(language_server) = language_server {
|
|
|
|
|
|
|
|
if language_server.is_initialized() {
|
|
|
|
|
|
|
|
return Ok(());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if let Some(notification) =
|
|
|
|
language_server.text_document_did_save(identifier, &text)
|
|
|
|
language_server.text_document_did_save(identifier, &text)
|
|
|
|
}) {
|
|
|
|
{
|
|
|
|
notification.await?;
|
|
|
|
notification.await?;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
}
|
|
|
|