Enable show-trailing-whitespace selectively
Instead of enabling it globally and disabling it in particular modes, we do the opposite. There are fewer edge cases this way.
This commit is contained in:
parent
81a054deda
commit
f7fb729269
1 changed files with 4 additions and 5 deletions
|
@ -223,11 +223,10 @@ read-only or not file-visiting."
|
|||
;; prompts the user for confirmation when deleting a non-empty frame
|
||||
(global-set-key [remap delete-frame] #'doom/delete-frame)
|
||||
|
||||
;; Use this instead of `whitespace-mode' because it's faster (implemented in C)
|
||||
(setq-default show-trailing-whitespace t)
|
||||
;; Except in the minibuffer and read-only/special buffers
|
||||
(setq-hook! 'minibuffer-setup-hook show-trailing-whitespace nil)
|
||||
(setq-hook! 'change-major-mode-after-body-hook show-trailing-whitespace (not buffer-read-only))
|
||||
;; Use `show-trailing-whitespace' instead of `whitespace-mode' because it's
|
||||
;; faster (implemented in C). But try to only enable it in editing buffers.
|
||||
(setq-default show-trailing-whitespace nil)
|
||||
(setq-hook! '(prog-mode-hook text-mode-hook conf-mode-hook) show-trailing-whitespace t)
|
||||
|
||||
;; The native border "consumes" a pixel of the fringe on righter-most splits,
|
||||
;; `window-divider' does not. Available since Emacs 25.1.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue