I'm trying to set the whitespace color with something less visible, but for some reason is not applying it.

   '(whitespace-space ((t (:background "red")))))

this inside the dotspacemacs/user-config (on .spacemacs file)

is the correct way? there is a log to check errors? maybe something override it?

  • Your piece of code works for me, do you enable whitespace-mode using e.g. M-x whitespace-mode ? Commented Oct 20, 2023 at 16:02
  • 1
    Did you set this via M-x customize-group whitespace? I would recommend you to do it that way. After applying your customizations, you can find how it is done by Emacs at the end of your .spacemacs file, and if you really want, you could move those definitions to another location. Commented Oct 21, 2023 at 9:55

1 Answer 1


well if works for anyone

(defun dotspacemacs/user-config ()
  (setq whitespace-display-mappings '(
                                      (space-mark   ?\     [?\u00B7]     [?.])
                                      (space-mark   ?\xA0  [?\u00A4]     [?_])
                                      (newline-mark ?\n    [?\u0000 ?\n])
                                      (tab-mark     ?\t    [?\u00BB ?\t] [?\\ ?\t])

   '(whitespace-space ((t (:foreground "black")))))
  (global-whitespace-mode t)

allow to show it as

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.