mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Move completion to ra_analysis
While we should handle completion for isolated file, it's better achieved by using empty Analysis, rather than working only with &File: we need memoization for type inference even inside a single file.
This commit is contained in:
parent
c02be1502c
commit
f3fb59d707
6 changed files with 711 additions and 63 deletions
|
@ -13,6 +13,7 @@ mod imp;
|
|||
mod symbol_index;
|
||||
mod completion;
|
||||
mod syntax_ptr;
|
||||
mod mock_analysis;
|
||||
|
||||
use std::{
|
||||
fmt,
|
||||
|
@ -30,10 +31,12 @@ use crate::{
|
|||
|
||||
pub use crate::{
|
||||
descriptors::function::FnDescriptor,
|
||||
input::{FileId, FileResolver, CrateGraph, CrateId}
|
||||
completion::CompletionItem,
|
||||
input::{FileId, FileResolver, CrateGraph, CrateId},
|
||||
mock_analysis::MockAnalysis,
|
||||
};
|
||||
pub use ra_editor::{
|
||||
CompletionItem, FileSymbol, Fold, FoldKind, HighlightedRange, LineIndex, Runnable,
|
||||
FileSymbol, Fold, FoldKind, HighlightedRange, LineIndex, Runnable,
|
||||
RunnableKind, StructureNode,
|
||||
};
|
||||
|
||||
|
@ -197,7 +200,7 @@ impl Query {
|
|||
|
||||
#[derive(Debug)]
|
||||
pub struct Analysis {
|
||||
imp: AnalysisImpl,
|
||||
pub(crate) imp: AnalysisImpl,
|
||||
}
|
||||
|
||||
impl Analysis {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue