mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Auto merge of #12808 - Veykril:check-workspace, r=Veykril
feat: Only flycheck workspace that belongs to saved file Supercedes https://github.com/rust-lang/rust-analyzer/pull/11038 There is still the problem that all the diagnostics are cleared, only clearing diagnostics of the relevant workspace isn't easily doable though I think, will have to dig into that
This commit is contained in:
commit
0fe3bcfd35
7 changed files with 123 additions and 23 deletions
|
@ -192,6 +192,7 @@ impl GlobalState {
|
|||
if let Some(path) = vfs.file_path(file.file_id).as_path() {
|
||||
let path = path.to_path_buf();
|
||||
if reload::should_refresh_for_change(&path, file.change_kind) {
|
||||
tracing::warn!("fetch-fiel_change");
|
||||
self.fetch_workspaces_queue
|
||||
.request_op(format!("vfs file change: {}", path.display()));
|
||||
}
|
||||
|
@ -201,6 +202,7 @@ impl GlobalState {
|
|||
}
|
||||
}
|
||||
|
||||
// Clear native diagnostics when their file gets deleted
|
||||
if !file.exists() {
|
||||
self.diagnostics.clear_native_for(file.file_id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue