feat(word-wrap): add soft-wrapping at fill-column

Using visual-fill-column.

Close: #1906
Co-authored-by: flatwhatson <flatwhatson@users.noreply.github.com>~
This commit is contained in:
Henrik Lissner 2022-11-02 16:27:46 +01:00
parent 4e3b94c602
commit 33db882ae6
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
4 changed files with 63 additions and 25 deletions

View file

@ -10,6 +10,18 @@ When a negative integer, dedent by this fixed amount.
Otherwise no extra indentation will be used.")
(defvar +word-wrap-fill-style nil
"How to handle `fill-column' in `+word-wrap-mode'.
When 'auto, long lines will soft-wrap at `fill-column'. If `auto-fill-mode' is
enabled, its behaviour will not be affected.
When 'soft, long lines will soft-wrap at `fill-column' and `auto-fill-mode' will
be forcibly disabled.
Otherwise long lines will soft-wrap at the window margin and `auto-fill-mode'
will not be affected.")
(defvar +word-wrap-disabled-modes
'(fundamental-mode so-long-mode)
"Major-modes where `+global-word-wrap-mode' should not enable