diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 2 |
2 files changed, 2 insertions, 2 deletions
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 { | |||
299 | } | 299 | } |
300 | 300 | ||
301 | /// Gets the syntax tree of the file. | 301 | /// Gets the syntax tree of the file. |
302 | pub fn file_syntax(&self, file_id: FileId) -> TreeArc<SourceFile> { | 302 | pub fn parse(&self, file_id: FileId) -> TreeArc<SourceFile> { |
303 | self.db.source_file(file_id).clone() | 303 | self.db.source_file(file_id).clone() |
304 | } | 304 | } |
305 | 305 | ||
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( | |||
314 | let mut res = false; | 314 | let mut res = false; |
315 | if let Some(ctx) = params.context { | 315 | if let Some(ctx) = params.context { |
316 | if ctx.trigger_character.unwrap_or_default() == ":" { | 316 | if ctx.trigger_character.unwrap_or_default() == ":" { |
317 | let source_file = world.analysis().file_syntax(position.file_id); | 317 | let source_file = world.analysis().parse(position.file_id); |
318 | let syntax = source_file.syntax(); | 318 | let syntax = source_file.syntax(); |
319 | let text = syntax.text(); | 319 | let text = syntax.text(); |
320 | if let Some(next_char) = text.char_at(position.offset) { | 320 | if let Some(next_char) = text.char_at(position.offset) { |