diff --git a/src/PowerShellEditorServices.Protocol/Server/LanguageServerSettings.cs b/src/PowerShellEditorServices.Protocol/Server/LanguageServerSettings.cs
index cee52d904..8a47d5996 100644
--- a/src/PowerShellEditorServices.Protocol/Server/LanguageServerSettings.cs
+++ b/src/PowerShellEditorServices.Protocol/Server/LanguageServerSettings.cs
@@ -141,6 +141,27 @@ public enum CodeFormattingPreset
Stroustrup
}
+ ///
+ /// Multi-line pipeline style settings.
+ ///
+ public enum PipelineIndentationStyle
+ {
+ ///
+ /// After the indentation level only once after the first pipeline and keep this level for the following pipelines.
+ ///
+ IncreaseIndentationForFirstPipeline,
+
+ ///
+ /// After every pipeline, keep increasing the indentation.
+ ///
+ IncreaseIndentationAfterEveryPipeline,
+
+ ///
+ /// Do not increase indentation level at all after pipeline.
+ ///
+ NoIndentation
+ }
+
public class CodeFormattingSettings
{
///
@@ -172,6 +193,7 @@ public CodeFormattingSettings(CodeFormattingSettings codeFormattingSettings)
public bool OpenBraceOnSameLine { get; set; }
public bool NewLineAfterOpenBrace { get; set; }
public bool NewLineAfterCloseBrace { get; set; }
+ public PipelineIndentationStyle PipelineIndentationStyle { get; set; }
public bool WhitespaceBeforeOpenBrace { get; set; }
public bool WhitespaceBeforeOpenParen { get; set; }
public bool WhitespaceAroundOperator { get; set; }
@@ -247,6 +269,7 @@ private Hashtable GetCustomPSSASettingsHashtable(int tabSize, bool insertSpaces)
{"PSUseConsistentIndentation", new Hashtable {
{"Enable", true},
{"IndentationSize", tabSize},
+ {"PipelineIndentation", PipelineIndentationStyle },
{"Kind", insertSpaces ? "space" : "tab"}
}},
{"PSUseConsistentWhitespace", new Hashtable {