Skip to content

Add support for space handling after opening and before closing non-empty parenthesis/brackets/braces. #1583

Open
@IvanDrag0

Description

@IvanDrag0

Summary of the new feature

Add functionality to allow the user to control adding spaces after opening and before closing non-empty parenthesis/brackets/braces.

For example:

(a + b) = c ==> ( a + b ) = c

if ($MyVar -eq $true){ } ==> if ( $MyVar -eq $true )

[OutputType([string])] ==> [ OutputType( [ string ] ) ]

Proposed technical implementation details (optional)

The TypeScript extension has the following options:

// Defines space handling after opening and before closing non empty parenthesis.
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,

// Defines space handling after opening and before closing non empty brackets.
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,

// Defines space handling after opening and before closing non empty braces.
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,

// Defines space handling after opening and before closing template string braces.
  "typescript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions