aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/main_loop
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop')
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs6
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 8f9db68a2..d1e8c5774 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -337,7 +337,11 @@ pub fn handle_completion(
337 None => return Ok(None), 337 None => return Ok(None),
338 Some(items) => items, 338 Some(items) => items,
339 }; 339 };
340 let items = items.into_iter().map(|item| item.conv()).collect(); 340 let line_index = world.analysis().file_line_index(position.file_id);
341 let items = items
342 .into_iter()
343 .map(|item| item.conv_with(&line_index))
344 .collect();
341 345
342 Ok(Some(req::CompletionResponse::Array(items))) 346 Ok(Some(req::CompletionResponse::Array(items)))
343} 347}