summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--emacs.d/init.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/emacs.d/init.el b/emacs.d/init.el
index df7aa4c..516f259 100644
--- a/emacs.d/init.el
+++ b/emacs.d/init.el
@@ -370,9 +370,7 @@
   :config
   (add-hook 'makefile-mode-hook
             #'(lambda ()
-                (setq whitespace-style '(face trailing tabs)
-                      tab-width 2)
-                (whitespace-mode))))
+                (setq-local tab-width 2))))
 
 (use-package markdown-mode
   ;; mode to support files in the Markdown format
@@ -574,6 +572,12 @@
   (setq tramp-default-method "ssh"
         tramp-persistency-file-name (expand-file-name "var/tramp" user-emacs-directory)))
 
+(use-package whitespace
+  ;; highlight white spaces
+  :config
+  (setq whitespace-style '(face trailing tabs))
+  (add-hook 'prog-mode-hook 'whitespace-mode))
+
 (use-package yaml-mode
   ;; mode to work wity YAML files
   :ensure t