Auto merge of #17647 - joshka:jm/rename-commands, r=Veykril

Rename rust-analyzer commands

The commands `editor.action.triggerParameterHints` and
`editor.action.rename` are now renamed to
`rust-analyzer.triggerParameterHints` and `rust-analyzer.rename`

This change helps make it clear that these commands are specific to
rust-analyzer and not part of the default set of commands provided by
VSCode.

Fixes: https://github.com/rust-lang/rust-analyzer/issues/17644

Note: This seems like it will be a breaking change for any RA client that previously reacted to `editor.action.triggerParameterHints` - naive search: https://github.com/search?q=editor.action.triggerParameterHints+AND+%28NOT+is%3Afork%29+rust-analyzer&type=code
This commit is contained in:
bors 2024-07-22 08:10:03 +00:00
commit c29bac1cdf
6 changed files with 9 additions and 9 deletions

View file

@ -36,7 +36,7 @@ pub struct Assist {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Command {
/// Show the parameter hints popup.
TriggerSignatureHelp,
TriggerParameterHints,
/// Rename the just inserted item.
Rename,
}

View file

@ -307,8 +307,8 @@ impl SourceChangeBuilder {
}
/// Triggers the parameter hint popup after the assist is applied
pub fn trigger_signature_help(&mut self) {
self.command = Some(Command::TriggerSignatureHelp);
pub fn trigger_parameter_hints(&mut self) {
self.command = Some(Command::TriggerParameterHints);
}
/// Renames the item at the cursor position after the assist is applied