From 1f5beecd45bf3f91db80165426e4a0949fe78fbf Mon Sep 17 00:00:00 2001
From: Case Duckworth
Date: Wed, 5 May 2021 12:34:44 -0500
Subject: Add whitespace-cleanup-mode

---
 init.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/init.el b/init.el
index da6623c..e2d5950 100644
--- a/init.el
+++ b/init.el
@@ -563,9 +563,7 @@
             tab-width 4
             backward-delete-char-untabify-method 'hungry)
 
-  (:global "M-SPC" cycle-spacing)
-  
-  (add-hook 'before-save-hook #'whitespace-cleanup))
+  (:global "M-SPC" cycle-spacing))
 
 (setup windows
   (:option use-dialog-box nil
@@ -1047,6 +1045,9 @@ if ripgrep is installed, otherwise `consult-grep'."
   (which-key-setup-side-window-right-bottom)
   (which-key-mode +1))
 
+(setup (:straight whitespace-cleanup-mode)
+  (global-whitespace-cleanup-mode +1))
+
 (setup (:straight winum)
   (:option winum-auto-setup-mode-line nil
            winum-ignored-buffers '(" *which-key*"))
-- 
cgit 1.4.1-21-gabe81