Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/commands.ts')
| -rw-r--r-- | editors/code/src/commands.ts | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index 2b0b300106..7ebc186a3e 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts @@ -100,12 +100,6 @@ export function memoryUsage(ctx: CtxInit): Cmd { }; } -export function shuffleCrateGraph(ctx: CtxInit): Cmd { - return async () => { - return ctx.client.sendRequest(ra.shuffleCrateGraph); - }; -} - export function triggerParameterHints(_: CtxInit): Cmd { return async () => { const parameterHintsEnabled = vscode.workspace @@ -118,6 +112,12 @@ export function triggerParameterHints(_: CtxInit): Cmd { }; } +export function rename(_: CtxInit): Cmd { + return async () => { + await vscode.commands.executeCommand("editor.action.rename"); + }; +} + export function openLogs(ctx: CtxInit): Cmd { return async () => { if (ctx.client.outputChannel) { @@ -1197,9 +1197,10 @@ export function newDebugConfig(ctx: CtxInit): Cmd { } export function hoverRefCommandProxy(_: Ctx): Cmd { - return async () => { - if (HOVER_REFERENCE_COMMAND) { - const { command, arguments: args = [] } = HOVER_REFERENCE_COMMAND; + return async (index: number) => { + const link = HOVER_REFERENCE_COMMAND[index]; + if (link) { + const { command, arguments: args = [] } = link; await vscode.commands.executeCommand(command, ...args); } }; @@ -1512,13 +1513,3 @@ export function openWalkthrough(_: Ctx): Cmd { ); }; } - -export function openFAQ(_: Ctx): Cmd { - return async () => { - await vscode.commands.executeCommand( - "workbench.action.openWalkthrough", - "rust-lang.rust-analyzer#faq", - true, - ); - }; -} |