Add Spacing for Nonempty Brackets Formatting Option

User formatting option to add single space after opening and before
closing nonempty brackets.
This commit is contained in:
ToddThomson
2015-08-13 11:56:35 -07:00
parent f92aa8681a
commit 9146d9bc2f
8 changed files with 46 additions and 12 deletions

View File

@@ -990,6 +990,7 @@ namespace ts.server {
InsertSpaceAfterKeywordsInControlFlowStatements: true,
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: false,
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
PlaceOpenBraceOnNewLineForFunctions: false,
PlaceOpenBraceOnNewLineForControlBlocks: false,
}

View File

@@ -452,6 +452,9 @@ declare namespace ts.server.protocol {
/** Defines space handling after opening and before closing non empty parenthesis. Default value is false. */
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
/** Defines space handling after opening and before closing non empty brackets. Default value is false. */
insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
/** Defines whether an open brace is put onto a new line for functions or not. Default value is false. */
placeOpenBraceOnNewLineForFunctions?: boolean;