Prime open files on load

This commit is contained in:
Aleksey Kladov 2020-03-05 12:42:04 +01:00
parent 94c48980bb
commit fc970d188e
3 changed files with 25 additions and 0 deletions

View file

@ -13,6 +13,7 @@
pub mod mock_analysis;
mod source_change;
mod prime_caches;
mod status;
mod completion;
mod runnables;
@ -227,6 +228,10 @@ impl Analysis {
self.with_db(|db| status::status(&*db))
}
pub fn prime_caches(&self, files: Vec<FileId>) -> Cancelable<()> {
self.with_db(|db| prime_caches::prime_caches(db, files))
}
/// Gets the text of the source file.
pub fn file_text(&self, file_id: FileId) -> Cancelable<Arc<String>> {
self.with_db(|db| db.file_text(file_id))