From 2d4fa96f65d1b6fc9c4847fcd52ff8e20f0edbab Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Tue, 3 Sep 2019 23:55:22 +0100 Subject: [PATCH] Add powershell.codeFormatting.autoCorrectAliases setting to add support for optionally correcting aliases as well (added in PSSA 1.18.2). Disabled by default. Requires the following PSES PR to be merged first: https://github.com/PowerShell/PowerShellEditorServices/pull/1021 --- package.json | 5 +++++ src/settings.ts | 2 ++ 2 files changed, 7 insertions(+) diff --git a/package.json b/package.json index d535188a92..2b0d781f80 100644 --- a/package.json +++ b/package.json @@ -540,6 +540,11 @@ "default": true, "description": "Shows the last line of a folded section similar to the default VSCode folding style. When disabled, the entire folded region is hidden." }, + "powershell.codeFormatting.autoCorrectAliases": { + "type": "boolean", + "default": false, + "description": "Replaces aliases with their aliased name." + }, "powershell.codeFormatting.preset": { "type": "string", "enum": [ diff --git a/src/settings.ts b/src/settings.ts index c537b3a98d..86660e143f 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -41,6 +41,7 @@ export interface ICodeFoldingSettings { } export interface ICodeFormattingSettings { + autoCorrectAliases: boolean; preset: CodeFormattingPreset; openBraceOnSameLine: boolean; newLineAfterOpenBrace: boolean; @@ -137,6 +138,7 @@ export function load(): ISettings { }; const defaultCodeFormattingSettings: ICodeFormattingSettings = { + autoCorrectAliases: false, preset: CodeFormattingPreset.Custom, openBraceOnSameLine: true, newLineAfterOpenBrace: true,