mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Auto merge of #16773 - Veykril:text-explorer, r=Veykril
fix: Add config and capability for test explorer
This commit is contained in:
commit
ce15e73a8e
7 changed files with 41 additions and 12 deletions
|
@ -1146,6 +1146,10 @@ impl Config {
|
|||
self.experimental("colorDiagnosticOutput")
|
||||
}
|
||||
|
||||
pub fn test_explorer(&self) -> bool {
|
||||
self.experimental("testExplorer")
|
||||
}
|
||||
|
||||
pub fn publish_diagnostics(&self) -> bool {
|
||||
self.data.diagnostics_enable
|
||||
}
|
||||
|
|
|
@ -386,10 +386,11 @@ impl GlobalState {
|
|||
}
|
||||
}
|
||||
|
||||
let update_diagnostics = (!was_quiescent || state_changed || memdocs_added_or_removed)
|
||||
&& self.config.publish_diagnostics();
|
||||
if update_diagnostics {
|
||||
let things_changed = !was_quiescent || state_changed || memdocs_added_or_removed;
|
||||
if things_changed && self.config.publish_diagnostics() {
|
||||
self.update_diagnostics();
|
||||
}
|
||||
if things_changed && self.config.test_explorer() {
|
||||
self.update_tests();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue