aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index 307082865..e65f075a6 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -438,6 +438,7 @@ pub fn handle_prepare_rename(
438 world: WorldSnapshot, 438 world: WorldSnapshot,
439 params: req::TextDocumentPositionParams, 439 params: req::TextDocumentPositionParams,
440) -> Result<Option<PrepareRenameResponse>> { 440) -> Result<Option<PrepareRenameResponse>> {
441 let _p = profile("handle_prepare_rename");
441 let position = params.try_conv_with(&world)?; 442 let position = params.try_conv_with(&world)?;
442 443
443 // We support renaming references like handle_rename does. 444 // We support renaming references like handle_rename does.
@@ -455,6 +456,7 @@ pub fn handle_prepare_rename(
455} 456}
456 457
457pub fn handle_rename(world: WorldSnapshot, params: RenameParams) -> Result<Option<WorkspaceEdit>> { 458pub fn handle_rename(world: WorldSnapshot, params: RenameParams) -> Result<Option<WorkspaceEdit>> {
459 let _p = profile("handle_rename");
458 let position = params.text_document_position.try_conv_with(&world)?; 460 let position = params.text_document_position.try_conv_with(&world)?;
459 461
460 if params.new_name.is_empty() { 462 if params.new_name.is_empty() {
@@ -480,6 +482,7 @@ pub fn handle_references(
480 world: WorldSnapshot, 482 world: WorldSnapshot,
481 params: req::ReferenceParams, 483 params: req::ReferenceParams,
482) -> Result<Option<Vec<Location>>> { 484) -> Result<Option<Vec<Location>>> {
485 let _p = profile("handle_references");
483 let position = params.text_document_position.try_conv_with(&world)?; 486 let position = params.text_document_position.try_conv_with(&world)?;
484 487
485 let refs = match world.analysis().find_all_refs(position)? { 488 let refs = match world.analysis().find_all_refs(position)? {
@@ -741,6 +744,7 @@ pub fn handle_document_highlight(
741 world: WorldSnapshot, 744 world: WorldSnapshot,
742 params: req::TextDocumentPositionParams, 745 params: req::TextDocumentPositionParams,
743) -> Result<Option<Vec<DocumentHighlight>>> { 746) -> Result<Option<Vec<DocumentHighlight>>> {
747 let _p = profile("handle_document_highlight");
744 let file_id = params.text_document.try_conv_with(&world)?; 748 let file_id = params.text_document.try_conv_with(&world)?;
745 let line_index = world.analysis().file_line_index(file_id)?; 749 let line_index = world.analysis().file_line_index(file_id)?;
746 750