Skip to content

insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets not adding space before closing bracket. #20456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mjbvz opened this issue Dec 4, 2017 · 2 comments
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Fixed A PR has been merged for this issue VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Dec 4, 2017

From @charlieprynn on December 4, 2017 16:53

  • VSCode Version: 1.18.1
  • OS Version: macOS 10.12.6

Steps to Reproduce:

  1. Set javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets to true
  2. Auto indent [{ name: 'Main' }]
  3. It becomes [ { name: 'Main' }] instead of [ { name: 'Main' } ]

Reproduces without extensions: Yes

Copied from original issue: microsoft/vscode#39571

@mjbvz mjbvz self-assigned this Dec 4, 2017
@mjbvz mjbvz added the editor label Dec 4, 2017
@mjbvz mjbvz added VS Code Tracked There is a VS Code equivalent to this issue and removed editor labels Dec 4, 2017
@mjbvz mjbvz removed their assignment Dec 4, 2017
@mjbvz
Copy link
Contributor Author

mjbvz commented Dec 4, 2017

Here are the TS Server messages:

[Trace  - 1:28:02 PM] Sending request: configure (191). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "/Users/matb/projects/san/sub/a.js",
    "formatOptions": {
        "tabSize": 4,
        "indentSize": 4,
        "convertTabsToSpaces": true,
        "newLineCharacter": "\n",
        "insertSpaceAfterCommaDelimiter": true,
        "insertSpaceAfterConstructor": false,
        "insertSpaceAfterSemicolonInForStatements": true,
        "insertSpaceBeforeAndAfterBinaryOperators": true,
        "insertSpaceAfterKeywordsInControlFlowStatements": true,
        "insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
        "insertSpaceBeforeFunctionParenthesis": false,
        "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
        "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,
        "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
        "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
        "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
        "placeOpenBraceOnNewLineForFunctions": false,
        "placeOpenBraceOnNewLineForControlBlocks": false
    }
}
[Trace  - 1:28:02 PM] Response received: configure (191). Request took 1 ms. Success: true 
[Trace  - 1:28:02 PM] Sending request: format (192). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "/Users/matb/projects/san/sub/a.js",
    "line": 1,
    "offset": 1,
    "endLine": 1,
    "endOffset": 19
}
[Trace  - 1:28:02 PM] Response received: format (192). Request took 1 ms. Success: true 
Result: [
    {
        "start": {
            "line": 1,
            "offset": 2
        },
        "end": {
            "line": 1,
            "offset": 2
        },
        "newText": " "
    }
]

@charlieprynn
Copy link

Any update on this issue?

@mhegazy mhegazy added Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter labels Jan 4, 2018
@mhegazy mhegazy assigned ghost Jan 4, 2018
@mhegazy mhegazy added this to the TypeScript 2.7 milestone Jan 4, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Jan 6, 2018
@ghost ghost closed this as completed in #21038 Jan 6, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: Formatter The issue relates to the built-in formatter Fixed A PR has been merged for this issue VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

3 participants