fix: whitespace has a separate built-in package
It has a better hook (whitespace-cleanup) than the barebones delete-trailing-whitespace.
This commit is contained in:
parent
adab1147e0
commit
377a5cadff
1 changed files with 8 additions and 2 deletions
10
config.org
10
config.org
|
|
@ -72,10 +72,16 @@ The audible bell is annoying AF.
|
||||||
(setq column-number-mode 1)
|
(setq column-number-mode 1)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Delete trailing whitespaces
|
** Whitespace cleanup
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
(use-package whitespace
|
||||||
|
:ensure nil
|
||||||
|
:defer t
|
||||||
|
:hook (before-save-hook . whitespace-cleanup)
|
||||||
|
;; if we wanna remove this hook at any time, eval:
|
||||||
|
;; (remove-hook 'before-save-hook #'whitespace-cleanup)
|
||||||
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Save history and recent files
|
** Save history and recent files
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue