From 171f6e6d00d1fc99395b7b92c8a40b47d6bd6962 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 20 Jan 2019 21:01:11 +0300 Subject: somewhat better name --- crates/ra_ide_api/src/lib.rs | 2 +- crates/ra_lsp_server/src/main_loop/handlers.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates') diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index 9ee5467ed..e41d85e70 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs @@ -299,7 +299,7 @@ impl Analysis { } /// Gets the syntax tree of the file. - pub fn file_syntax(&self, file_id: FileId) -> TreeArc { + pub fn parse(&self, file_id: FileId) -> TreeArc { self.db.source_file(file_id).clone() } diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index b70d67b4d..5cd8abbb9 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -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) { -- cgit v1.2.3