Skip to content

Commit 2d4fa96

Browse files
committed
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: PowerShell/PowerShellEditorServices#1021
1 parent a11e27c commit 2d4fa96

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Diff for: package.json

+5
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,11 @@
540540
"default": true,
541541
"description": "Shows the last line of a folded section similar to the default VSCode folding style. When disabled, the entire folded region is hidden."
542542
},
543+
"powershell.codeFormatting.autoCorrectAliases": {
544+
"type": "boolean",
545+
"default": false,
546+
"description": "Replaces aliases with their aliased name."
547+
},
543548
"powershell.codeFormatting.preset": {
544549
"type": "string",
545550
"enum": [

Diff for: src/settings.ts

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export interface ICodeFoldingSettings {
4141
}
4242

4343
export interface ICodeFormattingSettings {
44+
autoCorrectAliases: boolean;
4445
preset: CodeFormattingPreset;
4546
openBraceOnSameLine: boolean;
4647
newLineAfterOpenBrace: boolean;
@@ -137,6 +138,7 @@ export function load(): ISettings {
137138
};
138139

139140
const defaultCodeFormattingSettings: ICodeFormattingSettings = {
141+
autoCorrectAliases: false,
140142
preset: CodeFormattingPreset.Custom,
141143
openBraceOnSameLine: true,
142144
newLineAfterOpenBrace: true,

0 commit comments

Comments
 (0)