Skip to content

Adding an exception to the 'newLineAfterCloseBrace' setting #576

Closed
@adbertram

Description

@adbertram

System Details

  • Operating system name and version: MacOS Sierra
  • VS Code version: 1.10.2
  • PowerShell extension version: 0.10.1
  • Output from $PSVersionTable:
Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.15
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

I like the newLineAfterCloseBrace setting but I'd rather it not apply all the time. For example, in the scenario where I'm using a where or foreach method. https://www.screencast.com/t/KFWP9dDE66z0

This is how I'd like it to format:

@().foreach({

})

However, this is how it does:

@().foreach({

    })

You can see that a bracket ending with a new line isn't always involved with a control statement.

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