Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better generic ObjectCreationExpressionSyntax #239

Closed
belav opened this issue May 30, 2021 · 2 comments
Closed

Better generic ObjectCreationExpressionSyntax #239

belav opened this issue May 30, 2021 · 2 comments
Labels
area:formatting type:bug Something isn't working

Comments

@belav
Copy link
Owner

belav commented May 30, 2021

The current formatting is

    public static Dictionary<Type, string> PropertiesByType = new Dictionary<
        Type,
        string
    >();

I think it would be possible to format like this, but this may require conditionalGroups. See #7

    public static Dictionary<Type, string> PropertiesByType =
        new Dictionary<Type, string();
@shocklateboy92
Copy link
Collaborator

I don't get why conditional groups would be needed. I thought the logic in doc for nested groups is to try breaking the outer groups before inner ones.

So if we change the printer to something loosely resembling:

Doc.Group(
    Node.Print(/* the stuff on the left */),
    "=",
    Node.Print(/* the stuff on the right */)
)

Would we not get the desired effect?
Same goes for #250

@belav
Copy link
Owner Author

belav commented Jul 19, 2021

This appears to have been resolved at some point

@belav belav closed this as completed Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:formatting type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants