@@ -57,6 +57,11 @@ config_data! {
57
57
/// Placeholder expression to use for missing expressions in assists.
58
58
assist_expressionFillDefault: ExprFillDefaultDef = "\" todo\" " ,
59
59
60
+ /// Warm up caches on project load.
61
+ cachePriming_enable: bool = "true" ,
62
+ /// How many worker threads to to handle priming caches. The default `0` means to pick automatically.
63
+ cachePriming_numThreads: ParallelCachePrimingNumThreads = "0" ,
64
+
60
65
/// Automatically refresh project info via `cargo metadata` on
61
66
/// `Cargo.toml` or `.cargo/config.toml` changes.
62
67
cargo_autoreload: bool = "true" ,
@@ -320,11 +325,6 @@ config_data! {
320
325
/// Whether to show `can't find Cargo.toml` error message.
321
326
notifications_cargoTomlNotFound: bool = "true" ,
322
327
323
- /// Warm up caches on project load.
324
- primeCaches_enable: bool = "true" ,
325
- /// How many worker threads to to handle priming caches. The default `0` means to pick automatically.
326
- primeCaches_numThreads: ParallelPrimeCachesNumThreads = "0" ,
327
-
328
328
/// Expand attribute macros. Requires `#rust-analyzer.procMacro.enable#` to be set.
329
329
procMacro_attributes_enable: bool = "true" ,
330
330
/// Enable support for procedural macros, implies `#rust-analyzer.cargo.buildScripts.enable#`.
@@ -402,7 +402,7 @@ pub struct Config {
402
402
snippets : Vec < Snippet > ,
403
403
}
404
404
405
- type ParallelPrimeCachesNumThreads = u8 ;
405
+ type ParallelCachePrimingNumThreads = u8 ;
406
406
407
407
#[ derive( Debug , Clone , Eq , PartialEq ) ]
408
408
pub enum LinkedProject {
@@ -716,7 +716,7 @@ impl Config {
716
716
}
717
717
718
718
pub fn prefill_caches ( & self ) -> bool {
719
- self . data . primeCaches_enable
719
+ self . data . cachePriming_enable
720
720
}
721
721
722
722
pub fn location_link ( & self ) -> bool {
@@ -1189,7 +1189,7 @@ impl Config {
1189
1189
}
1190
1190
1191
1191
pub fn prime_caches_num_threads ( & self ) -> u8 {
1192
- match self . data . primeCaches_numThreads {
1192
+ match self . data . cachePriming_numThreads {
1193
1193
0 => num_cpus:: get_physical ( ) . try_into ( ) . unwrap_or ( u8:: MAX ) ,
1194
1194
n => n,
1195
1195
}
@@ -1661,7 +1661,7 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
1661
1661
"Search for all symbols kinds"
1662
1662
] ,
1663
1663
} ,
1664
- "ParallelPrimeCachesNumThreads " => set ! {
1664
+ "ParallelCachePrimingNumThreads " => set ! {
1665
1665
"type" : "number" ,
1666
1666
"minimum" : 0 ,
1667
1667
"maximum" : 255
0 commit comments