File tree 4 files changed +20
-1
lines changed
4 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ config_data! {
58
58
/// Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
59
59
assist_allowMergingIntoGlobImports: bool = "true" ,
60
60
61
+ /// Warm up caches on project load.
62
+ cache_warmup: bool = "true" ,
63
+
61
64
/// Show function name and docs in parameter hints.
62
65
callInfo_full: bool = "true" ,
63
66
@@ -545,6 +548,10 @@ impl Config {
545
548
)
546
549
}
547
550
551
+ pub fn prefill_caches ( & self ) -> bool {
552
+ self . data . cache_warmup
553
+ }
554
+
548
555
pub fn location_link ( & self ) -> bool {
549
556
try_or ! ( self . caps. text_document. as_ref( ) ?. definition?. link_support?, false )
550
557
}
Original file line number Diff line number Diff line change @@ -433,7 +433,9 @@ impl GlobalState {
433
433
for flycheck in & self . flycheck {
434
434
flycheck. update ( ) ;
435
435
}
436
- self . prime_caches_queue . request_op ( ) ;
436
+ if self . config . prefill_caches ( ) {
437
+ self . prime_caches_queue . request_op ( ) ;
438
+ }
437
439
}
438
440
439
441
if !was_quiescent || state_changed {
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ Group inserted imports by the https://rust-analyzer.github.io/manual.html#auto-i
23
23
--
24
24
Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;` .
25
25
--
26
+ [[rust-analyzer.cache.warmup]]rust-analyzer.cache.warmup (default: `true` )::
27
+ +
28
+ --
29
+ Warm up caches on project load.
30
+ --
26
31
[[rust-analyzer.callInfo.full]]rust-analyzer.callInfo.full (default: `true` )::
27
32
+
28
33
--
Original file line number Diff line number Diff line change 445
445
"default" : true ,
446
446
"type" : " boolean"
447
447
},
448
+ "rust-analyzer.cache.warmup" : {
449
+ "markdownDescription" : " Warm up caches on project load." ,
450
+ "default" : true ,
451
+ "type" : " boolean"
452
+ },
448
453
"rust-analyzer.callInfo.full" : {
449
454
"markdownDescription" : " Show function name and docs in parameter hints." ,
450
455
"default" : true ,
You can’t perform that action at this time.
0 commit comments