Open fogzot opened 6 years ago
To be clear, this is what you are proposing, yes?
Current
"rewrap.wrappingColumn": 50,
// This is a comment that will wrap at n chars and |
// go to the next line as expected |
// This comment should have an allowed |
// line length and not be wrapped at the |
// wrappingColumn value |
Proposed
"rewrap.lengthType": "length", // ["length", "column"]
"rewrap.wrappingLength": 50,
// This is a comment that will wrap at n chars and |
// go to the next line as expected |
// This comment should have an allowed line length
// and not be wrapped at the wrappingColumn value
Yes, that's exactly what I'd like to be able to do. :)
It would be best to have two constraints at the same time: the width of the comment itself, and the maximum line width in general.
Quoting the Rust Style Guide:
Source lines which are entirely a comment should be limited to 80 characters in length (including comment sigils, but excluding indentation) or the maximum width of the line (including comment sigils and indentation), whichever is smaller: ...
Are there any plans to implement this?
Comments are usually indented to align with the code and when rewrapping more indented code results in shorter comment lines. It would be nice if Rewrap could wrap the comments to an absolute line length instead of a fixed column. Something like "always make the comment lines 60 characters"