mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Delete trailing whitespace, globally, by default
Also adds doom|disable-delete-trailing-whitespace hook, which can be used to disable this behavior on a per-buffer basis. If you want to turn off this global behavior: (remove-hook 'write-file-functions #'delete-trailing-whitespace)
This commit is contained in:
@ -81,6 +81,11 @@ fundamental-mode) for performance sake."
|
||||
|
||||
(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)
|
||||
|
||||
;; Deleting trailing whitespace is on by default, but must be set on
|
||||
;; write-file-functions, so that editorconfig can see it (so it doesn't add it
|
||||
;; redundantly and can remove it when needed).
|
||||
(add-hook 'write-file-functions #'delete-trailing-whitespace)
|
||||
|
||||
;; revert buffers for changed files
|
||||
(def-package! autorevert
|
||||
:after-call after-find-file
|
||||
|
Reference in New Issue
Block a user