-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add new line before 'where' constraints in Quick Info #60545
Add new line before 'where' constraints in Quick Info #60545
Conversation
Pics please. For simple and complex cases. |
Testing revealed that this doesn't handle named types. Named types take a different code path ( I'll adjust the implementation and add unit tests once an approach is decided:
|
@Youssef1313 Looking at your screenshot, I would say, that you should add some offset ( |
Thanks @DoctorKrolic @CyrusNajmabadi Let me know what do you think |
Can you also add a test where someone has a comment like this? /// <summary>
/// This is some text <see langword="where"/> I shouldn't have a line break.
/// </summary> |
@Youssef1313 Can you please revisit this PR. When a class has really many |
@DoctorKrolic I'm getting a little bit busy as my university exams are approaching. :( |
@Youssef1313 do you want to continue this pr? |
I'll take over this PR. |
@@ -478,28 +501,6 @@ private void AddDescriptionForNamedType(INamedTypeSymbol symbol) | |||
} | |||
} | |||
|
|||
private void AddSymbolDescription(INamedTypeSymbol symbol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inlined this.
Thank you @CyrusNajmabadi. Sorry I wasn't able to continue it. Lots of stuff taking up my time :( |
Not a problem at all :) |
Closes #5 (the oldest open issue 😄)
Open question:
I could have done this in SymbolDisplay in the compiler layer. But I'm not sure if this would be okay.
If this is to be done in the compiler layer, it can be done in two ways:
SymbolDisplayMiscellaneousOptions.LineBreakBeforeTypeParameterConstraint
(will be a new public API).The current approach is to do the work in IDE only.