aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index ff8d7a4f..8e57ef30 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -1907,7 +1907,7 @@ mod cmd {
let jobs = &mut cx.jobs;
let (_, doc) = current!(cx.editor);
- if let Some(path) = path {
+ if let Some(ref path) = path {
doc.set_path(Some(path.as_ref()))
.context("invalid filepath")?;
}
@@ -1927,6 +1927,11 @@ mod cmd {
});
let future = doc.format_and_save(fmt);
cx.jobs.add(Job::new(future).wait_before_exiting());
+
+ if path.is_some() {
+ let id = doc.id();
+ let _ = cx.editor.refresh_language_server(id);
+ }
Ok(())
}