From 0aeb6704cc75d06d40042862e17086c21be10682 Mon Sep 17 00:00:00 2001 From: Rafal Chlodnicki Date: Wed, 19 Nov 2025 21:00:40 +0100 Subject: [PATCH] fix: announce all supported commands --- src/commands/commandManager.ts | 4 ++++ src/lsp-server.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/src/commands/commandManager.ts b/src/commands/commandManager.ts index dfc789f6..81cd5728 100644 --- a/src/commands/commandManager.ts +++ b/src/commands/commandManager.ts @@ -30,6 +30,10 @@ export class CommandManager { } } + public get registeredIds(): string[] { + return Array.from(this.commands.keys()); + } + public async handle(commandId: Command['id'], ...args: unknown[]): Promise { const entry = this.commands.get(commandId); if (entry) { diff --git a/src/lsp-server.ts b/src/lsp-server.ts index 19d55813..d29510d4 100644 --- a/src/lsp-server.ts +++ b/src/lsp-server.ts @@ -223,6 +223,7 @@ export class LspServer { Commands.APPLY_RENAME_FILE, Commands.SOURCE_DEFINITION, Commands.TS_SERVER_REQUEST, + ...this.commandManager.registeredIds, ], }, hoverProvider: true,