diff --git a/package.json b/package.json index cf8dfc092b..bcd07405d1 100644 --- a/package.json +++ b/package.json @@ -591,6 +591,16 @@ "default": true, "description": "Adds a newline (line break) after a closing brace." }, + "powershell.codeFormatting.pipelineIndentationStyle": { + "type": "string", + "enum": [ + "IncreaseIndentationForFirstPipeline", + "IncreaseIndentationAfterEveryPipeline", + "NoIndentation" + ], + "default": "IncreaseIndentationForFirstPipeline", + "description": "Multi-line pipeline style settings." + }, "powershell.codeFormatting.whitespaceBeforeOpenBrace": { "type": "boolean", "default": true, diff --git a/src/settings.ts b/src/settings.ts index c7a87ffef7..e8f6fc4a4f 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -14,6 +14,12 @@ enum CodeFormattingPreset { Stroustrup, } +enum PipelineIndentationStyle { + IncreaseIndentationForFirstPipeline, + IncreaseIndentationAfterEveryPipeline, + NoIndentation, +} + export enum HelpCompletion { Disabled = "Disabled", BlockComment = "BlockComment", @@ -39,6 +45,7 @@ export interface ICodeFormattingSettings { openBraceOnSameLine: boolean; newLineAfterOpenBrace: boolean; newLineAfterCloseBrace: boolean; + pipelineIndentationStyle: PipelineIndentationStyle; whitespaceBeforeOpenBrace: boolean; whitespaceBeforeOpenParen: boolean; whitespaceAroundOperator: boolean; @@ -125,6 +132,7 @@ export function load(): ISettings { openBraceOnSameLine: true, newLineAfterOpenBrace: true, newLineAfterCloseBrace: true, + pipelineIndentationStyle: PipelineIndentationStyle.IncreaseIndentationForFirstPipeline, whitespaceBeforeOpenBrace: true, whitespaceBeforeOpenParen: true, whitespaceAroundOperator: true,