Skip to content

Commit 5affe06

Browse files
committed
Add new settings: powershell.codeFormatting.WhitespaceInsideBrace and powershell.codeFormatting.WhitespaceAroundPipe
1 parent 03bbcbe commit 5affe06

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,16 @@
585585
"default": true,
586586
"description": "Adds a space after a separator (',' and ';')."
587587
},
588+
"powershell.codeFormatting.WhitespaceInsideBrace": {
589+
"type": "boolean",
590+
"default": true,
591+
"description": "Adds a space after an opening brace ('}') and before a closing brace ('}')."
592+
},
593+
"powershell.codeFormatting.WhitespaceAroundPipe": {
594+
"type": "boolean",
595+
"default": true,
596+
"description": "Adds a space before and after a pipeline ('|')."
597+
},
588598
"powershell.codeFormatting.ignoreOneLineBlock": {
589599
"type": "boolean",
590600
"default": true,

src/settings.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ export interface ICodeFormattingSettings {
4343
whitespaceBeforeOpenParen: boolean;
4444
whitespaceAroundOperator: boolean;
4545
whitespaceAfterSeparator: boolean;
46+
WhitespaceInsideBrace: true;
47+
WhitespaceAroundPipe: true;
4648
ignoreOneLineBlock: boolean;
4749
alignPropertyValuePairs: boolean;
4850
}
@@ -129,6 +131,8 @@ export function load(): ISettings {
129131
whitespaceBeforeOpenParen: true,
130132
whitespaceAroundOperator: true,
131133
whitespaceAfterSeparator: true,
134+
WhitespaceInsideBrace: true,
135+
WhitespaceAroundPipe: true,
132136
ignoreOneLineBlock: true,
133137
alignPropertyValuePairs: true,
134138
};

0 commit comments

Comments
 (0)