mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
parent
51ac6de6f3
commit
1ceb2ea414
4 changed files with 54 additions and 7 deletions
|
@ -586,7 +586,7 @@ impl GlobalState {
|
|||
}
|
||||
}
|
||||
}
|
||||
vfs::loader::Message::Progress { n_total, n_done, config_version } => {
|
||||
vfs::loader::Message::Progress { n_total, n_done, file, config_version } => {
|
||||
always!(config_version <= self.vfs_config_version);
|
||||
|
||||
self.vfs_progress_config_version = config_version;
|
||||
|
@ -601,10 +601,23 @@ impl GlobalState {
|
|||
assert_eq!(n_done, n_total);
|
||||
Progress::End
|
||||
};
|
||||
|
||||
let mut message = format!("{n_done}/{n_total}");
|
||||
if let Some(file) = file {
|
||||
message += &format!(
|
||||
": {}",
|
||||
match file.strip_prefix(&self.config.root_path()) {
|
||||
Some(relative_path) => relative_path.as_ref(),
|
||||
None => file.as_ref(),
|
||||
}
|
||||
.display()
|
||||
);
|
||||
}
|
||||
|
||||
self.report_progress(
|
||||
"Roots Scanned",
|
||||
state,
|
||||
Some(format!("{n_done}/{n_total}")),
|
||||
Some(message),
|
||||
Some(Progress::fraction(n_done, n_total)),
|
||||
None,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue