File tree 3 files changed +8
-0
lines changed
3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 359
359
"default" : true ,
360
360
"description" : " A new line must follow an open brace."
361
361
},
362
+ "powershell.codeFormatting.newLineAfterCloseBrace" : {
363
+ "type" : " boolean" ,
364
+ "default" : true ,
365
+ "description" : " A new line must follow a close brace."
366
+ },
362
367
"powershell.codeFormatting.whitespaceBeforeOpenBrace" : {
363
368
"type" : " boolean" ,
364
369
"default" : true ,
Original file line number Diff line number Diff line change @@ -414,6 +414,7 @@ class PSDocumentFormattingEditProvider implements
414
414
415
415
case "PSPlaceCloseBrace" :
416
416
ruleSettings [ "IgnoreOneLineBlock" ] = psSettings . codeFormatting . ignoreOneLineBlock ;
417
+ ruleSettings [ "NewLineAfter" ] = psSettings . codeFormatting . newLineAfterCloseBrace ;
417
418
break ;
418
419
419
420
case "PSUseConsistentIndentation" :
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import vscode = require('vscode');
9
9
export interface ICodeFormattingSettings {
10
10
openBraceOnSameLine : boolean ;
11
11
newLineAfterOpenBrace : boolean ;
12
+ newLineAfterCloseBrace : boolean ;
12
13
whitespaceBeforeOpenBrace : boolean ;
13
14
whitespaceBeforeOpenParen : boolean ;
14
15
whitespaceAroundOperator : boolean ;
@@ -56,6 +57,7 @@ export function load(myPluginId: string): ISettings {
56
57
let defaultCodeFormattingSettings : ICodeFormattingSettings = {
57
58
openBraceOnSameLine : true ,
58
59
newLineAfterOpenBrace : true ,
60
+ newLineAfterCloseBrace : true ,
59
61
whitespaceBeforeOpenBrace : true ,
60
62
whitespaceBeforeOpenParen : true ,
61
63
whitespaceAroundOperator : true ,
You can’t perform that action at this time.
0 commit comments