From e13e8d7b548a526487d57d76e70333933728cb92 Mon Sep 17 00:00:00 2001 From: Richard Kim Date: Mon, 4 Jul 2022 13:07:40 -0700 Subject: [PATCH] Enable tws mode also in text-mode in addition to prog-mode. --- core/templates/.spacemacs.template | 6 ++++-- layers/+spacemacs/spacemacs-defaults/packages.el | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) 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