Is there a way not to align methods parameters in columns?

I am using the “Align similar code in columns” style formatting to align the methods names and variables names so they are flush to the left. However it's also aligning the paramaters names in the methods. For example here, there's all the space between ‘string’ and ‘repositoryName’ and between ‘int’ and ‘repositoryKey’. 
And for variables, it's aligning the = signs too.

Is there a way to align the method and variables names but not align the rest of the lines?




 

0
4 comments

Hello Abdu Bukres, thank you for your question. Please try disabling the following option: "(Extensions) | ReSharper | Options | Code Editing | C# | Formatting Style | Tabs, Indents, Alignment | Align similar code in columns | Multiline method signature". Does it help?

As for the “=” signs for variables, the following option is responsible for this behavior: “(Extensions) | ReSharper | Options | Code Editing | C# | Formatting Style | Tabs, Indents, Alignment | Align similar code in columns | Variables and local constants”. If you would like to see different behavior, please create a feature request to our bug tracker.

I would also like to share with you information on how to quickly find the desired formatter option by code. Please take a look at the web help page: Learn formatting rules from existing code.

Please let us know if you have any questions. Thank you!

 

0

The ‘Multiline method signature’ setting worked. I will create a feature request for the = sign as it seems there's no way to have the variable names aligned without also aligning the = sign.
Thanks.

0

Please leave a link to the new feature request here so that other users can also see it. Thank you!

0

Please sign in to leave a comment.