From 61b9d60783d608d9390e947fd53a729bb41c193e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Jun 2026 17:30:30 +0000 Subject: [PATCH 1/3] Initial plan From 4e5daa549b271ed1233a23e11c6c2f1d22e588d7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Jun 2026 17:37:58 +0000 Subject: [PATCH 2/3] Add here-string autoClosingPairs to language configuration Closes #1517 VS Code PR microsoft/vscode#95245 added autoclosing pairs for PowerShell here-strings to VS Code's built-in language configuration. This change explicitly adds the same pairs to the extension's setLanguageConfiguration call so the behavior is self-documenting and works correctly regardless of the VS Code version. --- package-lock.json | 4 ++-- src/extension.ts | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index f51c954422..00026c70ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "powershell", - "version": "2026.1.1", + "version": "2026.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "powershell", - "version": "2026.1.1", + "version": "2026.1.2", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@microsoft/applicationinsights-common": "^3.4.1", diff --git a/src/extension.ts b/src/extension.ts index e6002ad05e..77727710b2 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -82,6 +82,19 @@ export async function activate( ["(", ")"], ], + autoClosingPairs: [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + // Here-strings: auto-close @' with \n'@ and @" with \n"@ + // (fix for https://github.com/PowerShell/vscode-powershell/issues/1517) + { open: "@'", close: "\n'@", notIn: ["string", "comment"] }, + { open: '@"', close: '\n"@', notIn: ["string", "comment"] }, + { open: '"', close: '"', notIn: ["string"] }, + { open: "'", close: "'", notIn: ["string", "comment"] }, + ["<#", "#>"], + ], + onEnterRules: [ { // e.g. /** | */ From 9f13af6217e85bab65744e128499261741dce299 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Aug 2026 22:23:16 +0000 Subject: [PATCH 3/3] =?UTF-8?q?Revert=20here-string=20autoClosingPairs=20c?= =?UTF-8?q?hange=20=E2=80=94=20resolved=20upstream=20in=20VS=20Code=20core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fix from microsoft/vscode#95245 (merged April 2020) is already present in every VS Code version ≥1.45. The extension's minimum required version is ^1.114.0, so all users already pick up the here-string autoclosing behavior from VS Code's built-in PowerShell language-configuration.json. Additionally, setLanguageConfiguration() only replaces keys explicitly provided; since `autoClosingPairs` was never specified in the extension's call, VS Code's built-in pairs (including the here-string entries) were never overridden. The explicit addition was therefore redundant. Closes #1517 Co-authored-by: andyleejordan <2226434+andyleejordan@users.noreply.github.com> --- src/extension.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 77727710b2..e6002ad05e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -82,19 +82,6 @@ export async function activate( ["(", ")"], ], - autoClosingPairs: [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - // Here-strings: auto-close @' with \n'@ and @" with \n"@ - // (fix for https://github.com/PowerShell/vscode-powershell/issues/1517) - { open: "@'", close: "\n'@", notIn: ["string", "comment"] }, - { open: '@"', close: '\n"@', notIn: ["string", "comment"] }, - { open: '"', close: '"', notIn: ["string"] }, - { open: "'", close: "'", notIn: ["string", "comment"] }, - ["<#", "#>"], - ], - onEnterRules: [ { // e.g. /** | */