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. /** | */