From 1d597bd9815dc513e37269bfd8ae63594254b7be Mon Sep 17 00:00:00 2001 From: Jingyuan Li Date: Fri, 27 Jun 2025 14:50:27 -0700 Subject: [PATCH 1/2] fix: onDidSaveTextDocument notification method name --- packages/amazonq/src/lsp/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/amazonq/src/lsp/client.ts b/packages/amazonq/src/lsp/client.ts index 6cbb05dd582..9544c298733 100644 --- a/packages/amazonq/src/lsp/client.ts +++ b/packages/amazonq/src/lsp/client.ts @@ -326,7 +326,7 @@ async function onLanguageServerReady( } as RenameFilesParams) }), vscode.workspace.onDidSaveTextDocument((e) => { - client.sendNotification('workspace/didSaveTextDocument', { + client.sendNotification('textDocument/didSave', { textDocument: { uri: e.uri.fsPath, }, From 92b7fa705650c5f969d78b6939ec1338964741b8 Mon Sep 17 00:00:00 2001 From: Jingyuan Li Date: Mon, 30 Jun 2025 11:45:17 -0700 Subject: [PATCH 2/2] fix: duplicated onDidSaveTextDocument notification --- packages/amazonq/src/lsp/client.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/amazonq/src/lsp/client.ts b/packages/amazonq/src/lsp/client.ts index 9544c298733..0a5b5c2b088 100644 --- a/packages/amazonq/src/lsp/client.ts +++ b/packages/amazonq/src/lsp/client.ts @@ -12,7 +12,6 @@ import { CreateFilesParams, DeleteFilesParams, DidChangeWorkspaceFoldersParams, - DidSaveTextDocumentParams, GetConfigurationFromServerParams, RenameFilesParams, ResponseMessage, @@ -325,13 +324,6 @@ async function onLanguageServerReady( }), } as RenameFilesParams) }), - vscode.workspace.onDidSaveTextDocument((e) => { - client.sendNotification('textDocument/didSave', { - textDocument: { - uri: e.uri.fsPath, - }, - } as DidSaveTextDocumentParams) - }), vscode.workspace.onDidChangeWorkspaceFolders((e) => { client.sendNotification('workspace/didChangeWorkspaceFolder', { event: {