mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Prime open files on load
This commit is contained in:
parent
94c48980bb
commit
fc970d188e
3 changed files with 25 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue