Skip to content

Commit c15f9dc

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. (#2165)
Requires the following PSES PR to be merged first: PowerShell/PowerShellEditorServices#1021
1 parent 447a295 commit c15f9dc

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

package.json

Lines changed: 5 additions & 0 deletions
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": [

src/settings.ts

Lines changed: 2 additions & 0 deletions
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)