Skip to content

Expose insert..Braces rule in VS Code settings#21649

Merged
mjbvz merged 3 commits intomicrosoft:masterfrom
magnushiie:master
Apr 13, 2017
Merged

Expose insert..Braces rule in VS Code settings#21649
mjbvz merged 3 commits intomicrosoft:masterfrom
magnushiie:master

Conversation

@magnushiie
Copy link
Contributor

Fixes #18043

@msftclas
Copy link

msftclas commented Mar 1, 2017

@magnushiie,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@mention-bot
Copy link

@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.

@magnushiie
Copy link
Contributor Author

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?

Copy link
Collaborator

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Collaborator

@mjbvz mjbvz Mar 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@magnushiie
Copy link
Contributor Author

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.

@mjbvz mjbvz added this to the Backlog milestone Mar 3, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Mar 3, 2017

@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

@mjbvz mjbvz modified the milestones: April 2017, Backlog Apr 13, 2017
@mjbvz mjbvz merged commit 95f0c15 into microsoft:master Apr 13, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Apr 13, 2017

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

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose Typescript insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces rule in VS Code settings

4 participants