csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

Feature request: wrap comments

Open GSGBen opened this issue 3 years ago • 1 comments

Hey, thanks for the awesome extension, it's great work.

Being able to have the formatting or just the wrapping apply to all types of comments would make files even more consistent. The existing Rewrap extension is nice but doesn't have an option to run on save.

GSGBen avatar May 13 '22 05:05 GSGBen

I actually had a coworker asking me about this same feature last week.

The original stance of csharpier was to only modify whitespace, and wrapping comments would involve more than just modifying whitespace. But more recently I think that stance is starting to change.

However I worry that wrapping comments could get tricky. It sounds like prettier avoids it https://prettier.io/docs/en/rationale.html#comments the main reason being it isn't easy to understand the content of a comment, which means it would be hard to decide when it should be left alone vs wrapped. It looks like the source of rewrap is on github, so I can see how they do things.

Xml documentation comments should be easier to understand, my coworkers main gripe was when summary comments are auto added as multiple lines, when they can easily fit onto a single line.

belav avatar May 18 '22 00:05 belav