Add bounded soft wrap (#16586)

Closes #14700 #8164

Release Notes:

- Added `soft_wrap` value `bounded`,EditorWidth and PreferredLineLength
min value

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
0x2CA 2024-08-23 02:51:32 +08:00 committed by GitHub
parent 4e2b08b909
commit abb5800d20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 3 deletions

View file

@ -379,10 +379,12 @@ pub enum SoftWrap {
None,
/// Prefer a single line generally, unless an overly long line is encountered.
PreferLine,
/// Soft wrap lines that overflow the editor
/// Soft wrap lines that exceed the editor width
EditorWidth,
/// Soft wrap lines at the preferred line length
PreferredLineLength,
/// Soft wrap line at the preferred line length or the editor width (whichever is smaller)
Bounded,
}
/// Controls the behavior of formatting files when they are saved.