Skip to content

Commit a5487d7

Browse files
committed
Add powershell.codeformatting.pipelineIndentationStyle setting
1 parent 03bbcbe commit a5487d7

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

package.json

+10
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,16 @@
565565
"default": true,
566566
"description": "Adds a newline (line break) after a closing brace."
567567
},
568+
"powershell.codeFormatting.pipelineIndentationStyle": {
569+
"type": "string",
570+
"enum": [
571+
"IncreaseIndentationForFirstPipeline",
572+
"IncreaseIndentationAfterEveryPipeline",
573+
"NoIndentation"
574+
],
575+
"default": "IncreaseIndentationForFirstPipeline",
576+
"description": "Multi-line pipeline style settings."
577+
},
568578
"powershell.codeFormatting.whitespaceBeforeOpenBrace": {
569579
"type": "boolean",
570580
"default": true,

src/settings.ts

+8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ enum CodeFormattingPreset {
1414
Stroustrup,
1515
}
1616

17+
enum PipelineIndentationStyle {
18+
IncreaseIndentationForFirstPipeline,
19+
IncreaseIndentationAfterEveryPipeline,
20+
NoIndentation,
21+
}
22+
1723
export enum HelpCompletion {
1824
Disabled = "Disabled",
1925
BlockComment = "BlockComment",
@@ -39,6 +45,7 @@ export interface ICodeFormattingSettings {
3945
openBraceOnSameLine: boolean;
4046
newLineAfterOpenBrace: boolean;
4147
newLineAfterCloseBrace: boolean;
48+
pipelineIndentationStyle: PipelineIndentationStyle;
4249
whitespaceBeforeOpenBrace: boolean;
4350
whitespaceBeforeOpenParen: boolean;
4451
whitespaceAroundOperator: boolean;
@@ -125,6 +132,7 @@ export function load(): ISettings {
125132
openBraceOnSameLine: true,
126133
newLineAfterOpenBrace: true,
127134
newLineAfterCloseBrace: true,
135+
pipelineIndentationStyle: PipelineIndentationStyle.IncreaseIndentationForFirstPipeline,
128136
whitespaceBeforeOpenBrace: true,
129137
whitespaceBeforeOpenParen: true,
130138
whitespaceAroundOperator: true,

0 commit comments

Comments
 (0)