somewhat better name

This commit is contained in:
Aleksey Kladov 2019-01-20 21:01:11 +03:00
parent 1ec1bd8139
commit 171f6e6d00
2 changed files with 2 additions and 2 deletions

View File

@ -299,7 +299,7 @@ impl Analysis {
}
/// Gets the syntax tree of the file.
pub fn file_syntax(&self, file_id: FileId) -> TreeArc<SourceFile> {
pub fn parse(&self, file_id: FileId) -> TreeArc<SourceFile> {
self.db.source_file(file_id).clone()
}

View File

@ -314,7 +314,7 @@ pub fn handle_completion(
let mut res = false;
if let Some(ctx) = params.context {
if ctx.trigger_character.unwrap_or_default() == ":" {
let source_file = world.analysis().file_syntax(position.file_id);
let source_file = world.analysis().parse(position.file_id);
let syntax = source_file.syntax();
let text = syntax.text();
if let Some(next_char) = text.char_at(position.offset) {