aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/lib.rs')
-rw-r--r--crates/ra_analysis/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs
index 67a239a5c..7078e2d31 100644
--- a/crates/ra_analysis/src/lib.rs
+++ b/crates/ra_analysis/src/lib.rs
@@ -11,6 +11,7 @@ mod descriptors;
11mod imp; 11mod imp;
12mod roots; 12mod roots;
13mod symbol_index; 13mod symbol_index;
14mod completion;
14 15
15use std::{fmt::Debug, sync::Arc}; 16use std::{fmt::Debug, sync::Arc};
16 17
@@ -246,8 +247,7 @@ impl Analysis {
246 Ok(ra_editor::highlight(&file)) 247 Ok(ra_editor::highlight(&file))
247 } 248 }
248 pub fn completions(&self, file_id: FileId, offset: TextUnit) -> Cancelable<Option<Vec<CompletionItem>>> { 249 pub fn completions(&self, file_id: FileId, offset: TextUnit) -> Cancelable<Option<Vec<CompletionItem>>> {
249 let file = self.imp.file_syntax(file_id); 250 self.imp.completions(file_id, offset)
250 Ok(ra_editor::scope_completion(&file, offset))
251 } 251 }
252 pub fn assists(&self, file_id: FileId, range: TextRange) -> Cancelable<Vec<SourceChange>> { 252 pub fn assists(&self, file_id: FileId, range: TextRange) -> Cancelable<Vec<SourceChange>> {
253 Ok(self.imp.assists(file_id, range)) 253 Ok(self.imp.assists(file_id, range))