From 14cee66ebe21ad5ec22a2ae6c1df1f605234a759 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 14 Mar 2016 16:52:23 +0100 Subject: [PATCH] Enabled TS formatter settings --- extensions/typescript/package.json | 16 ++++++++-------- .../src/features/formattingProvider.ts | 3 +-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index b288895b51b..38e44c59f6f 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -108,22 +108,22 @@ }, "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": { "type": "boolean", - "default": true, + "default": false, "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis%" }, "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": { "type": "boolean", - "default": true, + "default": false, "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets%" }, "typescript.format.placeOpenBraceOnNewLineForFunctions": { "type": "boolean", - "default": true, + "default": false, "description": "%format.placeOpenBraceOnNewLineForFunctions%" }, "typescript.format.placeOpenBraceOnNewLineForControlBlocks": { "type": "boolean", - "default": true, + "default": false, "description": "%format.placeOpenBraceOnNewLineForControlBlocks%" }, "javascript.validate.enable": { @@ -158,22 +158,22 @@ }, "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": { "type": "boolean", - "default": true, + "default": false, "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis%" }, "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": { "type": "boolean", - "default": true, + "default": false, "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets%" }, "javascript.format.placeOpenBraceOnNewLineForFunctions": { "type": "boolean", - "default": true, + "default": false, "description": "%format.placeOpenBraceOnNewLineForFunctions%" }, "javascript.format.placeOpenBraceOnNewLineForControlBlocks": { "type": "boolean", - "default": true, + "default": false, "description": "%format.placeOpenBraceOnNewLineForControlBlocks%" } } diff --git a/extensions/typescript/src/features/formattingProvider.ts b/extensions/typescript/src/features/formattingProvider.ts index 2a1cc6f9b29..e5b70e2f938 100644 --- a/extensions/typescript/src/features/formattingProvider.ts +++ b/extensions/typescript/src/features/formattingProvider.ts @@ -146,7 +146,7 @@ export default class TypeScriptFormattingProvider implements DocumentRangeFormat indentSize: options.tabSize, convertTabsToSpaces: options.insertSpaces, // We can use \n here since the editor normalizes later on to its line endings. - newLineCharacter: '\n' /*, + newLineCharacter: '\n', insertSpaceAfterCommaDelimiter: this.config.insertSpaceAfterCommaDelimiter, insertSpaceAfterSemicolonInForStatements: this.config.insertSpaceAfterSemicolonInForStatements, insertSpaceBeforeAndAfterBinaryOperators: this.config.insertSpaceBeforeAndAfterBinaryOperators, @@ -156,7 +156,6 @@ export default class TypeScriptFormattingProvider implements DocumentRangeFormat insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: this.config.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets, placeOpenBraceOnNewLineForFunctions: this.config.placeOpenBraceOnNewLineForFunctions, placeOpenBraceOnNewLineForControlBlocks: this.config.placeOpenBraceOnNewLineForControlBlocks - */ }; } } \ No newline at end of file