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.ts13
1 files changed, 6 insertions, 7 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts
index 5048f820e4..c226aefeab 100644
--- a/editors/code/src/commands.ts
+++ b/editors/code/src/commands.ts
@@ -24,12 +24,12 @@ import {
isRustEditor,
type RustEditor,
type RustDocument,
+ unwrapUndefinable,
} from "./util";
import { startDebugSession, makeDebugConfig } from "./debug";
import type { LanguageClient } from "vscode-languageclient/node";
-import { LINKED_COMMANDS } from "./client";
+import { HOVER_REFERENCE_COMMAND } from "./client";
import type { DependencyId } from "./dependencies_provider";
-import { unwrapUndefinable } from "./undefinable";
import { log } from "./util";
export * from "./ast_inspector";
@@ -1196,11 +1196,10 @@ export function newDebugConfig(ctx: CtxInit): Cmd {
};
}
-export function linkToCommand(_: Ctx): Cmd {
- return async (commandId: string) => {
- const link = LINKED_COMMANDS.get(commandId);
- if (link) {
- const { command, arguments: args = [] } = link;
+export function hoverRefCommandProxy(_: Ctx): Cmd {
+ return async () => {
+ if (HOVER_REFERENCE_COMMAND) {
+ const { command, arguments: args = [] } = HOVER_REFERENCE_COMMAND;
await vscode.commands.executeCommand(command, ...args);
}
};