aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/caps.rs1
-rw-r--r--crates/rust-analyzer/src/lsp_ext.rs4
-rw-r--r--crates/rust-analyzer/src/main_loop/handlers.rs4
3 files changed, 5 insertions, 4 deletions
diff --git a/crates/rust-analyzer/src/caps.rs b/crates/rust-analyzer/src/caps.rs
index 4c417c270..13af75469 100644
--- a/crates/rust-analyzer/src/caps.rs
+++ b/crates/rust-analyzer/src/caps.rs
@@ -94,6 +94,7 @@ pub fn server_capabilities() -> ServerCapabilities {
94 ), 94 ),
95 experimental: Some(json!({ 95 experimental: Some(json!({
96 "joinLines": true, 96 "joinLines": true,
97 "ssr": true,
97 })), 98 })),
98 } 99 }
99} 100}
diff --git a/crates/rust-analyzer/src/lsp_ext.rs b/crates/rust-analyzer/src/lsp_ext.rs
index 1bb1b02ab..0fd60caf4 100644
--- a/crates/rust-analyzer/src/lsp_ext.rs
+++ b/crates/rust-analyzer/src/lsp_ext.rs
@@ -173,8 +173,8 @@ pub enum Ssr {}
173 173
174impl Request for Ssr { 174impl Request for Ssr {
175 type Params = SsrParams; 175 type Params = SsrParams;
176 type Result = SourceChange; 176 type Result = lsp_types::WorkspaceEdit;
177 const METHOD: &'static str = "rust-analyzer/ssr"; 177 const METHOD: &'static str = "experimental/ssr";
178} 178}
179 179
180#[derive(Debug, Deserialize, Serialize)] 180#[derive(Debug, Deserialize, Serialize)]
diff --git a/crates/rust-analyzer/src/main_loop/handlers.rs b/crates/rust-analyzer/src/main_loop/handlers.rs
index 121964718..25e660bd5 100644
--- a/crates/rust-analyzer/src/main_loop/handlers.rs
+++ b/crates/rust-analyzer/src/main_loop/handlers.rs
@@ -986,11 +986,11 @@ pub fn handle_document_highlight(
986pub fn handle_ssr( 986pub fn handle_ssr(
987 world: WorldSnapshot, 987 world: WorldSnapshot,
988 params: lsp_ext::SsrParams, 988 params: lsp_ext::SsrParams,
989) -> Result<lsp_ext::SourceChange> { 989) -> Result<lsp_types::WorkspaceEdit> {
990 let _p = profile("handle_ssr"); 990 let _p = profile("handle_ssr");
991 let source_change = 991 let source_change =
992 world.analysis().structural_search_replace(&params.query, params.parse_only)??; 992 world.analysis().structural_search_replace(&params.query, params.parse_only)??;
993 to_proto::source_change(&world, source_change) 993 to_proto::workspace_edit(&world, source_change)
994} 994}
995 995
996pub fn publish_diagnostics(world: &WorldSnapshot, file_id: FileId) -> Result<DiagnosticTask> { 996pub fn publish_diagnostics(world: &WorldSnapshot, file_id: FileId) -> Result<DiagnosticTask> {