Commit Graph

7 Commits

Author SHA1 Message Date
Henrik Lissner
fbdde6b5f4 module!: add :editor whitespace
BREAKING CHANGE: Moves ws-butler, dtrt-indent, and whitespace defaults
out of Doom's core and into a new module. ws-butler is gated behind
+trim and dtrt-indent behind +guess. Users who depend on/like these
packages will need to enable the new module and their respective
flags (which is the default going forward).

This change is motivated by an ongoing effort to slim down Doom's
core (by (re)moving non-essentials from it).

This also addresses an issue where dtrt-indent would vastly increase
load times for some major-modes (e.g. elixir-mode & elm-mode, see #7537)
by restricting it to non-project files and non-read-only buffers AND
excludign those two major modes from indent guessing.

Fix: #8516
Fix: #7537
2025-09-24 02:23:30 -04:00
Hyunggyu Jang
6479fc7132 fix(word-wrap): choose first element if indent-var is list 2024-06-19 22:25:34 -04:00
Henrik Lissner
33db882ae6 feat(word-wrap): add soft-wrapping at fill-column
Using visual-fill-column.

Close: #1906
Co-authored-by: flatwhatson <flatwhatson@users.noreply.github.com>~
2023-02-18 15:27:47 -05:00
Henrik Lissner
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
Henrik Lissner
26c8f5c6ef Bytecompiler bytecompiler, won't you shut up 2019-11-23 01:21:25 -05:00
Andrew Whatson
930d0d134a Improve +word-wrap in non-code buffers
Adds `+word-wrap-text-modes`, a list of modes which shouldn't get any
extra indentation. This is used for text and markdown modes, which
should just indent to the parent depth.

Adds `+word-wrap-visual-modes`, a list of modes which shouldn't enable
`adaptive-wrap-prefix-mode`. This is used to fix the prefix indentation
in `org-mode`, which provides its own implementation.

Tweaks the indent behaviour to treat strings the same as comments so
they don't receive additional indentation.
2019-10-16 00:48:40 +10:00
Andrew Whatson
6381a5c0ae Add :editor word-wrap module
Defines a new minor-mode `+word-wrap-mode` which configures
adaptive-wrap-prefix-mode and visual-line-mode for smart soft-wrapping
of code.

Evil users can toggle it with `SPC t w`.

Enable globally with `+global-word-wrap-mode`.

See the README for more details!
2019-08-27 15:04:38 +10:00