Add emacs whitespace cleanup hook

This commit is contained in:
Marco Thomas
2021-09-11 14:36:05 +02:00
parent 3ad8323f45
commit 257503a851

View File

@@ -92,6 +92,13 @@
;; Whitespace
(global-whitespace-mode t)
(setq whitespace-style '(face trailing tabs tab-mark))
; remove trailing whitespaces on save
(add-hook 'before-save-hook 'whitespace-cleanup)
;; Fold code
(add-hook 'prog-mode-hook #'hs-minor-mode)
(global-set-key (kbd "C-c <right>") 'hs-show-block)
(global-set-key (kbd "C-c <left>") 'hs-hide-block)
;; straight.el bootstrap
(setq straight-check-for-modifications 'live)
@@ -644,10 +651,6 @@
("XXX" . hl-todo-TODO)
("FIXME" . hl-todo-TODO))))
(add-hook 'prog-mode-hook #'hs-minor-mode)
(global-set-key (kbd "C-c <right>") 'hs-show-block)
(global-set-key (kbd "C-c <left>") 'hs-hide-block)
;; load local file
(when (file-exists-p "~/.emacs.d/local.el")
(message "Loading ~/.emacs.d/local.el")