File tree 1 file changed +16
-5
lines changed
src/PowerShellEditorServices.Protocol/Server
1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -96,25 +96,30 @@ public void Update(
96
96
}
97
97
98
98
/// <summary>
99
- /// code formatting presets
99
+ /// Code formatting presets.
100
+ /// See https://en.wikipedia.org/wiki/Indent_style for details on indent and brace styles.
100
101
/// </summary>
101
102
public enum CodeFormattingPreset
102
103
{
103
-
104
104
/// <summary>
105
105
/// Use the formatting settings as-is.
106
106
/// </summary>
107
107
Custom ,
108
108
109
109
/// <summary>
110
- /// Configure the formatting settings to resemble the one true brace style variant of KR indent/brace style.
110
+ /// Configure the formatting settings to resemble the Allman indent/brace style.
111
+ /// </summary>
112
+ Allman ,
113
+
114
+ /// <summary>
115
+ /// Configure the formatting settings to resemble the one true brace style variant of K&R indent/brace style.
111
116
/// </summary>
112
117
OTBS ,
113
118
114
119
/// <summary>
115
- /// Configure the formatting settings to resemble the Allman indent/brace style.
120
+ /// Configure the formatting settings to resemble the Stroustrup brace style variant of K&R indent/brace style.
116
121
/// </summary>
117
- Allman
122
+ Stroustrup
118
123
}
119
124
120
125
public class CodeFormattingSettings
@@ -184,6 +189,12 @@ public Hashtable GetPSSASettingsHashtable(
184
189
closeBraceSettings [ "NewLineAfter" ] = false ;
185
190
break ;
186
191
192
+ case CodeFormattingPreset . Stroustrup :
193
+ openBraceSettings [ "OnSameLine" ] = true ;
194
+ openBraceSettings [ "NewLineAfter" ] = true ;
195
+ closeBraceSettings [ "NewLineAfter" ] = true ;
196
+ break ;
197
+
187
198
default :
188
199
break ;
189
200
}
You can’t perform that action at this time.
0 commit comments