From 9541cfbf440ecd26561adb6161e730170788b8fe Mon Sep 17 00:00:00 2001 From: Laurens Miers Date: Thu, 12 Sep 2024 12:34:31 +0200 Subject: [PATCH] Delete trailing whitespaces before-saving Enable globally because I don't know of a scenario where we would ever want this. --- config_new.org | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/config_new.org b/config_new.org index 6a890d2..4866110 100644 --- a/config_new.org +++ b/config_new.org @@ -57,6 +57,12 @@ * General config +** Delete trailing whitespaces + +#+BEGIN_SRC emacs-lisp +(add-hook 'before-save-hook 'delete-trailing-whitespace) +#+END_SRC + ** Save history and recent files #+begin_src emacs-lisp @@ -103,7 +109,7 @@ https://www.gnu.org/software/emacs/manual/html_node/emacs/Icomplete.html More info : https://www.emacswiki.org/emacs/FullScreen #+begin_src emacs-lisp -(push '(fullscreen . maximized) default-frame-alist) +(push '(fullscreen . maximized) default-frame-alist) #+end_src ** ibuffer @@ -284,7 +290,7 @@ Install and wait for hydra to be available since we are using it in this init.el Workaround to enable eglot in all programming modes: #+BEGIN_SRC emacs-lisp -(add-hook 'prog-mode-hook 'eglot-ensure) +(add-hook 'prog-mode-hook 'eglot-ensure) #+END_SRC ** Yasnippet @@ -373,5 +379,3 @@ https://github.com/remyferre/comment-dwim-2 (define-key projectile-mode-map (kbd "C-x p") 'projectile-command-map) (projectile-mode +1) ) - -#+END_SRC