Expose insert..Braces rule in VS Code settings#21649
Conversation
|
@magnushiie, |
|
@magnushiie, thanks for your PR! By analyzing the history of the files in this pull request, we identified @alexandrudima and @dbaeumer to be potential reviewers. |
|
Not sure what the right process is to get changes in that depend on the latest TypeScript features. I just got microsoft/TypeScript#14387 merged and it has the version 2.3.0 but should the version be bumped or is there some other mechanism for VS Code to pick up the TS change? |
mjbvz
left a comment
There was a problem hiding this comment.
Thank you for the contribution!
I'm fine taking this into VSCode before we officially adopt TS 2.3 since users can install newer versions of TypeScript and configure VSCode to use these typescript.tsdk setting. Let's just make sure to clearly note that this is TS 2.3 specific in the setting description
| "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Defines space handling after function keyword for anonymous functions.", | ||
| "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Defines space handling after opening and before closing non empty parenthesis.", | ||
| "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Defines space handling after opening and before closing non empty brackets.", | ||
| "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Defines space handling after opening and before closing non empty braces.", |
There was a problem hiding this comment.
Please add a blurb at the end about requiring TS 2.3 or higher
tsfmt.json
Outdated
| "insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, | ||
| "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, | ||
| "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, | ||
| "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, |
There was a problem hiding this comment.
I'm inclined to leave this file alone for now since it is used for the VSCode codebase itself. Any specific reasons for adding this setting here?
|
Should I update the typescript dependency of extensions/typescript to 2.3.0-dev.20170302 or should we wait until 2.3.0 gets released? This change requires the protocol.d.ts changes. |
|
@magnushiie Since this requires a new version of the TypeScript protocol files, unfortunately we'll have to wait on this PR until we start officially adopting TS 2.3. VSCode currently tries to adopt new versions of TypeScript in the same month it will be officially shipped. TS 2.3 is on track for May, so we have wait until the May VSCode release to pick it up. Once we start adopting the first TS 2.3 insiders builds for VSCode insiders, we can merge in this change too Thanks again. Sorry that this will have to be delayed |
|
Thanks for the PR. We just adopted TS 2.3-insiders so I've merged this in. It should be in the next release. One small note: I did set this formatting option to default to true instead of false ( 5d80125 ) to preserve the current behavior |
Fixes #18043