diff options
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 02393f728..497f819be 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -340,7 +340,11 @@ pub fn handle_completion( | |||
340 | None => return Ok(None), | 340 | None => return Ok(None), |
341 | Some(items) => items, | 341 | Some(items) => items, |
342 | }; | 342 | }; |
343 | let items = items.into_iter().map(|item| item.conv()).collect(); | 343 | let line_index = world.analysis().file_line_index(position.file_id); |
344 | let items = items | ||
345 | .into_iter() | ||
346 | .map(|item| item.conv_with(&line_index)) | ||
347 | .collect(); | ||
344 | 348 | ||
345 | Ok(Some(req::CompletionResponse::Array(items))) | 349 | Ok(Some(req::CompletionResponse::Array(items))) |
346 | } | 350 | } |