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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user