diff --git a/core/templates/.spacemacs.template b/core/templates/.spacemacs.template index cacb6cac5..0de8e3a22 100644 --- a/core/templates/.spacemacs.template +++ b/core/templates/.spacemacs.template @@ -486,8 +486,10 @@ It should only modify the values of Spacemacs settings." ;; (default nil - same as frame-title-format) dotspacemacs-icon-title-format nil - ;; Show trailing whitespace (default t) - dotspacemacs-show-trailing-whitespace t + ;; Color highlight trailing whitespace in all prog-mode and text-mode derived + ;; modes such as c++-mode, python-mode, emacs-lisp, html-mode, rst-mode etc. + ;; (default t) + dotspacemacs-show-trailing-whitespace t ;; Delete whitespace while saving buffer. Possible values are `all' ;; to aggressively delete empty line and long sequences of whitespace, diff --git a/layers/+spacemacs/spacemacs-defaults/packages.el b/layers/+spacemacs/spacemacs-defaults/packages.el index 501ac9e1e..60c4ab137 100644 --- a/layers/+spacemacs/spacemacs-defaults/packages.el +++ b/layers/+spacemacs/spacemacs-defaults/packages.el @@ -511,6 +511,7 @@ 'trailing-whitespace nil :background (face-attribute 'font-lock-comment-face :foreground))) (add-hook 'prog-mode-hook 'spacemacs//trailing-whitespace) + (add-hook 'text-mode-hook 'spacemacs//trailing-whitespace) (spacemacs|add-toggle whitespace :mode whitespace-mode