mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Store all the data in the Salsa Database
This commit is contained in:
parent
2cb2074c4b
commit
ee4d904cfb
11 changed files with 337 additions and 199 deletions
|
@ -6,13 +6,14 @@ use ra_syntax::{
|
|||
|
||||
use crate::{
|
||||
FileId, Cancelable,
|
||||
db::{self, SyntaxDatabase},
|
||||
db::{self, SyntaxDatabase, input::FilesDatabase},
|
||||
descriptors::module::{ModulesDatabase, ModuleTree, ModuleId},
|
||||
};
|
||||
|
||||
pub(crate) fn resolve_based_completion(db: &db::RootDatabase, file_id: FileId, offset: TextUnit) -> Cancelable<Option<Vec<CompletionItem>>> {
|
||||
let source_root_id = db.file_source_root(file_id);
|
||||
let file = db.file_syntax(file_id);
|
||||
let module_tree = db.module_tree()?;
|
||||
let module_tree = db.module_tree(source_root_id)?;
|
||||
let file = {
|
||||
let edit = AtomEdit::insert(offset, "intellijRulezz".to_string());
|
||||
file.reparse(&edit)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue