mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
internal: Remove load-cargo dependency on ide
This commit is contained in:
parent
0ac05c0527
commit
4ee0dbdc04
18 changed files with 70 additions and 61 deletions
|
@ -17,7 +17,6 @@ mod fixture;
|
|||
|
||||
mod markup;
|
||||
mod navigation_target;
|
||||
mod prime_caches;
|
||||
|
||||
mod annotations;
|
||||
mod call_hierarchy;
|
||||
|
@ -68,7 +67,7 @@ use ide_db::{
|
|||
salsa::{self, ParallelDatabase},
|
||||
CrateOrigin, Env, FileLoader, FileSet, SourceDatabase, VfsPath,
|
||||
},
|
||||
symbol_index, FxHashMap, FxIndexSet, LineIndexDatabase,
|
||||
prime_caches, symbol_index, FxHashMap, FxIndexSet, LineIndexDatabase,
|
||||
};
|
||||
use syntax::SourceFile;
|
||||
use triomphe::Arc;
|
||||
|
@ -100,7 +99,6 @@ pub use crate::{
|
|||
},
|
||||
move_item::Direction,
|
||||
navigation_target::{NavigationTarget, TryToNav, UpmappingResult},
|
||||
prime_caches::ParallelPrimeCachesProgress,
|
||||
references::ReferenceSearchResult,
|
||||
rename::RenameError,
|
||||
runnables::{Runnable, RunnableKind, TestId},
|
||||
|
@ -127,6 +125,7 @@ pub use ide_db::{
|
|||
documentation::Documentation,
|
||||
label::Label,
|
||||
line_index::{LineCol, LineIndex},
|
||||
prime_caches::ParallelPrimeCachesProgress,
|
||||
search::{ReferenceCategory, SearchScope},
|
||||
source_change::{FileSystemEdit, SnippetEdit, SourceChange},
|
||||
symbol_index::Query,
|
||||
|
@ -165,6 +164,10 @@ impl AnalysisHost {
|
|||
AnalysisHost { db: RootDatabase::new(lru_capacity) }
|
||||
}
|
||||
|
||||
pub fn with_database(db: RootDatabase) -> AnalysisHost {
|
||||
AnalysisHost { db }
|
||||
}
|
||||
|
||||
pub fn update_lru_capacity(&mut self, lru_capacity: Option<usize>) {
|
||||
self.db.update_base_query_lru_capacities(lru_capacity);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue