Skip to content

Commit

Permalink
Add powershell.codeFormatting.autoCorrectAliases setting to add suppo…
Browse files Browse the repository at this point in the history
…rt 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
  • Loading branch information
bergmeister authored and rjmholt committed Sep 10, 2019
1 parent 447a295 commit c15f9dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
2 changes: 2 additions & 0 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export interface ICodeFoldingSettings {
}

export interface ICodeFormattingSettings {
autoCorrectAliases: boolean;
preset: CodeFormattingPreset;
openBraceOnSameLine: boolean;
newLineAfterOpenBrace: boolean;
Expand Down Expand Up @@ -137,6 +138,7 @@ export function load(): ISettings {
};

const defaultCodeFormattingSettings: ICodeFormattingSettings = {
autoCorrectAliases: false,
preset: CodeFormattingPreset.Custom,
openBraceOnSameLine: true,
newLineAfterOpenBrace: true,
Expand Down

0 comments on commit c15f9dc

Please sign in to comment.