diff options
| author | bors <bors@rust-lang.org> | 2024-07-15 09:53:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-15 09:53:39 +0000 |
| commit | 82d0187cf81a1c694f29ef838273fcd3cec45c35 (patch) | |
| tree | 8f53e6ef86d146a6fc2b4e7ab3a82a9e993a695c /src/tools/rust-analyzer/crates/ide | |
| parent | 305bd5d06604764a8c6244ccd1d4354e8b1a34f5 (diff) | |
| parent | e03998bb639e8e22dd12d870d2fa059f9cb671e0 (diff) | |
| download | rust-82d0187cf81a1c694f29ef838273fcd3cec45c35.tar.gz rust-82d0187cf81a1c694f29ef838273fcd3cec45c35.zip | |
Auto merge of #17587 - joshka:jm/edit-name-after-refactor, r=Veykril
Trigger VSCode to rename after extract variable assist is applied When the user applies the "Extract Variable" assist, the cursor is positioned at the newly inserted variable. This commit adds a command to the assist that triggers the rename action in VSCode. This way, the user can quickly rename the variable after applying the assist. Fixes part of: #17579 https://github.com/user-attachments/assets/4cf38740-ab22-4b94-b0f1-eddd51c26c29 I haven't yet looked at the module or function extraction assists yet.
Diffstat (limited to 'src/tools/rust-analyzer/crates/ide')
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide/src/ssr.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/ssr.rs b/src/tools/rust-analyzer/crates/ide/src/ssr.rs index b49fe391bf2..6133c33c71a 100644 --- a/src/tools/rust-analyzer/crates/ide/src/ssr.rs +++ b/src/tools/rust-analyzer/crates/ide/src/ssr.rs @@ -45,7 +45,7 @@ pub(crate) fn ssr_assists( group: Some(GroupLabel("Apply SSR".into())), target: comment_range, source_change, - trigger_signature_help: false, + command: None, }; ssr_assists.push(assist); @@ -143,7 +143,7 @@ mod tests { is_snippet: false, }, ), - trigger_signature_help: false, + command: None, } "#]] .assert_debug_eq(&apply_in_file_assist); @@ -196,7 +196,7 @@ mod tests { is_snippet: false, }, ), - trigger_signature_help: false, + command: None, } "#]] .assert_debug_eq(&apply_in_workspace_assist); @@ -236,7 +236,7 @@ mod tests { ), target: 10..21, source_change: None, - trigger_signature_help: false, + command: None, } "#]] .assert_debug_eq(&apply_in_file_assist); @@ -256,7 +256,7 @@ mod tests { ), target: 10..21, source_change: None, - trigger_signature_help: false, + command: None, } "#]] .assert_debug_eq(&apply_in_workspace_assist); |
