aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/document.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index b79e201d..f394f2be 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -111,10 +111,13 @@ impl Document {
let text = self.text().clone();
let path = self.path.clone().expect("Can't save with no path set!"); // TODO: handle no path
+ let identifier = self.identifier();
// TODO: mark changes up to now as saved
// TODO: mark dirty false
+ let language_server = self.language_server.clone();
+
async move {
use smol::{fs::File, prelude::*};
let mut file = File::create(path).await?;
@@ -125,8 +128,14 @@ impl Document {
}
// TODO: flush?
+ if let Some(language_server) = language_server {
+ language_server
+ .text_document_did_save(identifier, &text)
+ .await?;
+ }
+
Ok(())
- } // and_then notify save
+ }
}
pub fn set_language(