Yes, an option for each type would be more consistent. I only looked thoroughly at formatting options, and IMHO the following options would be better with this approach (one general option + one option for each type): 1. csharp_new_line_before_open_brace 2. csharp_space_within_parentheses (currently rather inconsistent, as there are separate options for space_between_method_call_parameter_list_parentheses and space_between_method_declaration_parameter_list_parentheses, typeof(...), default(...) and sizeof(...) are treated as method calls without any mention in documentation, and there is no way to change spacing of checked(...)) 3. csharp_indent_braces and csharp_indent_block_contents - should be possibly to specify a value for each brace type, like with csharp_new_line_before_open_brace. For example, I have a user request where user doesn't want to have namespace contents indented.
Dmitry On Friday, 6 January 2017 07:09:51 UTC+1, Jonathon Marolf wrote: > > I hear you about needing documentation, I hope to write that soon. So if > I'm hearing you correctly you correctly, you want to have an option for > each type in addition to the cach-all csharp_new_line_before_open_brace? > Are there other options that you feel this would be beneficial for or just > csharp_new_line_before_open_brace? > > On Wednesday, January 4, 2017 at 3:26:43 PM UTC-8, Dmitry Osinovskiy wrote: >> >> Hi Jonathon, >> >> I'm a little bit late to the party, but still my 2 cents after supporting >> your settings in another tool. I think that specifying a list of values in >> csharp_new_line_before_open_brace and csharp_space_within_parentheses won't >> be very convenient for users. Say, I want a new line before open brace for >> all cases except for lambdas and anonymous methods. I would have to write: >> >> csharp_new_line_before_open_brace = types, methods, properties, indexers, >> events, event_accessors, control_blocks, anonymous_types, >> object_collections, array_initializers, local_functions >> >> That looks a little bit cumbersome. IMHO, something like this would be >> better: >> csharp_new_line_before_open_brace = true >> csharp_new_line_before_open_brace_lambdas = false >> csharp_new_line_before_open_brace_anonymous_methods = false >> >> Also, it would be great to specify default values for settings in >> documentation. I had to dive in Roslyn sources for that. >> >> Dmitry Osinovskiy >> >> On Thursday, 3 November 2016 02:35:46 UTC+1, Jonathon Marolf wrote: >>> >>> Hello editorconfig community >>> >>> I am a developer at Microsoft working on the IDE for C# and Visual Basic >>> in Visual Studio. >>> >>> I am currently planning to add editorconfig support for most of the C# >>> and Visual Basic formatting options in Visual Studio. Note, the plan is to >>> eventually add these same options to projects like Omnisharp >>> <http://www.omnisharp.net/>so they would be supported in other places >>> besides Visual Studio. I would love to get feedback from all of you on how >>> well my proposed set of options fits into rest of editorconfig and what >>> changes you would like to see. >>> >>> here <https://gist.github.com/jmarolf/0e165b27a498b49e3b3512004ea9d8b8>is >>> the gist with my proposed set of options >>> >>> I look forward to your feedback. >>> >>> Thanks, >>> Jonathon Marolf >>> >>> -- You received this message because you are subscribed to the Google Groups "EditorConfig" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/editorconfig. For more options, visit https://groups.google.com/d/optout.
