summary refs log tree commit diff
path: root/emacs.d/custom
diff options
context:
space:
mode:
authorFranck Cuny <fcuny@twitter.com>2019-07-30 08:49:08 -0700
committerFranck Cuny <fcuny@twitter.com>2019-07-30 08:49:08 -0700
commitd5e1068368165d23b764fcad8866b775bd2704de (patch)
tree6b2d0f41f7503069cb4b6d693708248b46d0ec36 /emacs.d/custom
parent[zsh] small improvement to the prompt (diff)
downloademacs.d-d5e1068368165d23b764fcad8866b775bd2704de.tar.gz
[emacs] configuration for whitespace-mode
with trailing white space highlight on by default, they are
highlighted in places i don't care (e.g. mini buffer) and this is
distracting.  instead, only enable them for the modes i really care
about.
Diffstat (limited to 'emacs.d/custom')
-rw-r--r--emacs.d/custom/fcuny-edit.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/emacs.d/custom/fcuny-edit.el b/emacs.d/custom/fcuny-edit.el
index fec90ca..8284072 100644
--- a/emacs.d/custom/fcuny-edit.el
+++ b/emacs.d/custom/fcuny-edit.el
@@ -5,10 +5,17 @@
   (global-auto-revert-mode t))
 
 (use-package whitespace
+  :hook ((prog-mode         . fcuny/whitespace-setup)
+         (conf-mode-hook    . fcuny/whitespace-setup)
+         (outline-mode-hook . fcuny/whitespace-setup))
+
   :custom
-  (whitespace-style '(face trailing))
-  (show-trailing-whitespace t)
-  :hook ((prog-mode . whitespace-mode)))
+  (whitespace-style '(face))
+  (show-trailing-whitespace nil)
+
+  :init
+  (defun fcuny/whitespace-setup ()
+    (setq show-trailing-whitespace t)))
 
 (use-package electric-pair-mode
   :commands electric-pair-mode