File tree Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ config_data! {
5858 /// Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
5959 assist_allowMergingIntoGlobImports: bool = "true" ,
6060
61+ /// Pre-fill caches on project load.
62+ cache_prefill: bool = "true" ,
63+
6164 /// Show function name and docs in parameter hints.
6265 callInfo_full: bool = "true" ,
6366
@@ -545,6 +548,10 @@ impl Config {
545548 )
546549 }
547550
551+ pub fn prefill_caches ( & self ) -> bool {
552+ self . data . cache_prefill
553+ }
554+
548555 pub fn location_link ( & self ) -> bool {
549556 try_or ! ( self . caps. text_document. as_ref( ) ?. definition?. link_support?, false )
550557 }
Original file line number Diff line number Diff line change @@ -433,7 +433,9 @@ impl GlobalState {
433433 for flycheck in & self . flycheck {
434434 flycheck. update ( ) ;
435435 }
436- self . prime_caches_queue . request_op ( ) ;
436+ if self . config . prefill_caches ( ) {
437+ self . prime_caches_queue . request_op ( ) ;
438+ }
437439 }
438440
439441 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
2323--
2424Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;` .
2525--
26+ [[rust-analyzer.cache.prefill]]rust-analyzer.cache.prefill (default: `true` )::
27+ +
28+ --
29+ Pre-fill caches on project load.
30+ --
2631[[rust-analyzer.callInfo.full]]rust-analyzer.callInfo.full (default: `true` )::
2732+
2833--
Original file line number Diff line number Diff line change 445445 "default" : true ,
446446 "type" : " boolean"
447447 },
448+ "rust-analyzer.cache.prefill" : {
449+ "markdownDescription" : " Pre-fill caches on project load." ,
450+ "default" : true ,
451+ "type" : " boolean"
452+ },
448453 "rust-analyzer.callInfo.full" : {
449454 "markdownDescription" : " Show function name and docs in parameter hints." ,
450455 "default" : true ,
You can’t perform that action at this time.
0 commit comments