Auto merge of #16773 - Veykril:text-explorer, r=Veykril

fix: Add config and capability for test explorer
This commit is contained in:
bors 2024-03-06 18:26:40 +00:00
commit ce15e73a8e
7 changed files with 41 additions and 12 deletions

View file

@ -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
}

View file

@ -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();
}
}