Skip to content

Commit 93c8ae0

Browse files
committed
Auto merge of #13981 - Veykril:saveOnCheckStartup, r=Veykril
Don't run flycheck on startup unless checkOnSave is enabled The main reason people disable it is because they don't want the expensive checks to occur automatically, so we shouldn't trigger them at the start up either if this is disabled.
2 parents 760f2ff + c9d33cd commit 93c8ae0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/rust-analyzer/src/main_loop.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,10 @@ impl GlobalState {
287287
|| self.fetch_build_data_queue.op_requested());
288288

289289
if became_quiescent {
290-
// Project has loaded properly, kick off initial flycheck
291-
self.flycheck.iter().for_each(FlycheckHandle::restart);
290+
if self.config.check_on_save() {
291+
// Project has loaded properly, kick off initial flycheck
292+
self.flycheck.iter().for_each(FlycheckHandle::restart);
293+
}
292294
if self.config.prefill_caches() {
293295
self.prime_caches_queue.request_op("became quiescent".to_string());
294296
}

0 commit comments

Comments
 (0)