Search code examples
editorconfig

Formatting parameters in different lines using editor config


Is there any way to use editor config to format parameters in different lines.

  • Example 1 violates the guideline.
  • Example 2 has more than 3 parameters.

1


Solution

  • That's it.

    max_line_length=120
    
    csharp_wrap_after_declaration_lpar=true
    csharp_wrap_parameters_style=chop_if_long
    csharp_max_formal_parameters_on_line=3
    
    csharp_wrap_after_invocation_lpar=true
    csharp_wrap_arguments_style=chop_if_long
    csharp_max_invocation_arguments_on_line=3