]> git.lizzy.rs Git - rust.git/blobdiff - crates/rust-analyzer/src/config.rs
Add toggle to disable cache priming
[rust.git] / crates / rust-analyzer / src / config.rs
index 6a72c4e326186905e1b396500e483e3913578796..5826b6b114c2b455e68eab0d2a08e4b5eacf5f74 100644 (file)
@@ -58,6 +58,9 @@ struct ConfigData {
         /// Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
         assist_allowMergingIntoGlobImports: bool           = "true",
 
+        /// Warm up caches on project load.
+        cache_warmup: bool = "true",
+
         /// Show function name and docs in parameter hints.
         callInfo_full: bool                                = "true",
 
@@ -545,6 +548,10 @@ pub fn did_change_watched_files_dynamic_registration(&self) -> bool {
         )
     }
 
+    pub fn prefill_caches(&self) -> bool {
+        self.data.cache_warmup
+    }
+
     pub fn location_link(&self) -> bool {
         try_or!(self.caps.text_document.as_ref()?.definition?.link_support?, false)
     }