Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'src/commands.rs')
| -rw-r--r-- | src/commands.rs | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/commands.rs b/src/commands.rs index 014a3f8..b020c22 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -312,7 +312,7 @@ impl Editor { .text .to_l_position(*self.text.cursor.first()) .unwrap(); - let mut x = l.request_immediate::<rust_analyzer::lsp::ext::MoveItem>(&MoveItemParams { + let mut x = l.request_immediate::<rust_analyzer::lsp::ext::MoveItemRequest>(&MoveItemParams { direction: if let Cmd::RAMoveIU = z { MoveItemDirection::Up } else { MoveItemDirection::Down }, text_document: o.tid(), range: Range { start : r, end : r}, @@ -324,11 +324,11 @@ impl Editor { } } Cmd::RARestart => { - _ = l.request::<ReloadWorkspace>(&())?.0; + _ = l.request::<ReloadWorkspaceRequest>(&())?.0; } Cmd::RAParent => { - let Some(GotoDefinitionResponse::Link([ref x])) = - l.request_immediate::<ParentModule>( + let Some(DefinitionResponse::DefinitionLinkList([ref x])) = + l.request_immediate::<ParentModuleRequest>( &TextDocumentPositionParams { text_document: o.tid(), position: self @@ -344,8 +344,8 @@ impl Editor { self.go(x, w, lsp_mn)?; } Cmd::RAJoinLines => { - let teds = - l.request_immediate::<JoinLines>(&JoinLinesParams { + let teds = l.request_immediate::<JoinLinesRequest>( + &JoinLinesParams { ranges: self .text .cursor @@ -357,13 +357,14 @@ impl Editor { }) .collect(), text_document: o.tid(), - })?; + }, + )?; self.text .apply_tedits(&mut { teds }) .map_err(|_| report!("couldnt apply edits"))?; } Cmd::RADocs => { - let u = l.request_immediate::<ExternalDocs>( + let u = l.request_immediate::<ExternalDocsRequest>( &TextDocumentPositionParams { position: self .text @@ -405,12 +406,13 @@ impl Editor { .unwrap(); } Cmd::RARebuildProcMacros => { - _ = l.request::<RebuildProcMacros>(&())?; + _ = l.request::<RebuildProcMacrosRequest>(&())?; } - Cmd::RACancelFlycheck => l.notify::<CancelFlycheck>(&())?, + Cmd::RACancelFlycheck => + l.notify::<CancelFlycheckNotification>(&())?, Cmd::RAOpenCargoToml => { - let Some(GotoDefinitionResponse::Scalar(x)) = - &l.request_immediate::<OpenCargoToml>( + let Some(DefinitionResponse::Definition(x)) = + &l.request_immediate::<OpenCargoTomlRequest>( &OpenCargoTomlParams { text_document: o.tid() }, )? else { |