Code Style: spaces within C# tuple parentheses

I'm looking for a Code Style or .editorconfig setting for formatting C# tuples in the following way:

With spaces within parentheses:

public ( int x, int y ) Field;

public void Func( ( int x, int y ) FuncParam, List<( int x, int y )> FuncListParam )
{
}

Without spaces within parentheses:

public (int x, int y) Field;

public void Func( (int x, int y) FuncParam, List<(int x, int y)> FuncListParam )
{
}

I haven't been able to find one. As a close "peer", when deconstructing KeyValuePair<TKey, TValue>, it does get those spaces there within parentheses with my current style config.

var map = new Dictionary<int, int>();
foreach ( ( int x, int y ) in map )
{
}

Any help? Or a possible feature request? I'm using Rider 2023.3.2, Build #RD-233.13135.100

0
2 comments

Hello,

Could you please share what is the expected code sample you'd like to get with the formatting? You can also select this code sample in Rider and run Alt+Enter | Reformat and cleanup | Detect code style settings to check what Rider settings will be available for you.

Please let me know how it goes.

Thank you.

0

Hi,

In the original post I just shared that expected code sample regarding what I'm hoping you would provide a code style setting for.

And yes I'm aware of the Detect code style settings, but it doesn't detect anything there.

0

Please sign in to leave a comment.