Skip to content

Allow configuration on new line auto-operations #9493

Description

@Zaflis

Is your feature request related to a problem? Please describe.

The default formatter (for C#) moves the brackets to new line like this:
if (true)
{

}

Describe the solution you would like

I use a more compact and natural style where starting bracket does not move to its own line, such as:
if (true) {

}

Basically it should be an option for the extension to add new line or not, even if it's by manually configuring it by code. If it can already be done i have no clue how.

Applicable Scenarios

This is happening all the time while coding, extremely frequent as you can imagine. Brackets are major part of any code, and this extension is making my job much harder.

Describe alternatives you've considered

I tried to turn the formatter completely off, but it doesn't have an effect. My attempt was:
Right-click C# extension -> Settings -> OmniSharp -> Csharp>Format: Enable = false

And if i try to change the formatter, there is no option for "None":
Image

Additional context

JavaScript/TypeScript seems to have a similar setting already for VSCode

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions