From f8f454ab5c19c6e7d91b3a4e6bb63fb9bf5f2673 Mon Sep 17 00:00:00 2001 From: Mikhail Modin Date: Mon, 10 Feb 2020 22:45:38 +0000 Subject: Init implementation of structural search replace --- crates/ra_lsp_server/src/main_loop/handlers.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/ra_lsp_server/src/main_loop') diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 2e598fdcd..72bb48619 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -881,6 +881,11 @@ pub fn handle_document_highlight( )) } +pub fn handle_ssr(world: WorldSnapshot, params: req::SsrParams) -> Result { + let _p = profile("handle_ssr"); + world.analysis().structural_search_replace(¶ms.arg)??.try_conv_with(&world) +} + pub fn publish_diagnostics(world: &WorldSnapshot, file_id: FileId) -> Result { let _p = profile("publish_diagnostics"); let line_index = world.analysis().file_line_index(file_id)?; -- cgit v1.2.3