dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.06k stars 4.04k forks source link

I can't stop inserting spaces to the inside of braces #39849

Open vsfeedback opened 5 years ago

vsfeedback commented 5 years ago

This issue has been moved from a ticket on Developer Community.


Currently, C# formatter puts spaces to the front and back of array element braces. int[] arr = new int[] { 1, 2, 3 }; But I want to remove these spaces. int[] arr = new int[]{1, 2, 3};

How can I do this? I can't find related options in Tools | Options... menu.


Original Comments

Visual Studio Feedback System on 11/11/2019, 00:57 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Visual Studio Feedback System on 11/15/2019, 03:20 PM:

This issue is currently being investigated. Our team will get back to you if either more information is needed, a workaround is available, or the issue is resolved.


Original Solutions

(no solutions)

sharwell commented 4 years ago

Design review conclusion: we don't plan to directly support this format, but we would definitely want this case to be supported by the formatting extensibility API in #31691