Skip to content

Commit 7d66fb5

Browse files
bergmeisterrjmholt
authored andcommitted
Add powershell.codeFormatting.autoCorrectAliases setting to add support for optionally correcting aliases as well (added in PSSA 1.18.2). Disabled by default. (PowerShell#2165)
Requires the following PSES PR to be merged first: PowerShell/PowerShellEditorServices#1021
1 parent 6bda814 commit 7d66fb5

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
@@ -585,6 +585,11 @@
585585
"default": true,
586586
"description": "Shows the last line of a folded section similar to the default VSCode folding style. When disabled, the entire folded region is hidden."
587587
},
588+
"powershell.codeFormatting.autoCorrectAliases": {
589+
"type": "boolean",
590+
"default": false,
591+
"description": "Replaces aliases with their aliased name."
592+
},
588593
"powershell.codeFormatting.preset": {
589594
"type": "string",
590595
"enum": [

Diff for: src/settings.ts

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export interface ICodeFoldingSettings {
3535
}
3636

3737
export interface ICodeFormattingSettings {
38+
autoCorrectAliases: boolean;
3839
preset: CodeFormattingPreset;
3940
openBraceOnSameLine: boolean;
4041
newLineAfterOpenBrace: boolean;
@@ -121,6 +122,7 @@ export function load(): ISettings {
121122
};
122123

123124
const defaultCodeFormattingSettings: ICodeFormattingSettings = {
125+
autoCorrectAliases: false,
124126
preset: CodeFormattingPreset.Custom,
125127
openBraceOnSameLine: true,
126128
newLineAfterOpenBrace: true,

0 commit comments

Comments
 (0)