Beautify whitespace highlighting
The current whitespace faces make whitespace-mode too distracting to read with too many background colors. This commit removes the annoying colors for whitespace-space, whitespace-tab and whitespace-indentation because: - whitespace-tab and whitespace-space already use characters for visualizing their appearances. whitespace-tab uses ">>" while whitespace-space uses ".". Adding background colors is redundant and annoying. Editors like Notepad++ or Vim doesn't use background colors to depict such whitespace characters. - According to the documentation of whitespace-indentation: "Symbol face used to visualize 8 or more SPACEs at beginning of line. Used when `whitespace-style' includes the value `indentation'." It is used for highlighting first 8 characters or some customized value. We must also disable its background colors otherwise our buffers are still filled with annoying colors all over the places, since often indentation is around 8 spaces or less. Anyway, with whitespace-space and whitesspace-tab, such highlighting like whitespace-indentation is redundant and not needed.
This commit is contained in:
parent
18762615ae
commit
8e338adf74
|
@ -2716,7 +2716,15 @@ It is a string holding:
|
|||
:documentation "Globally display the whitespaces."
|
||||
:evil-leader "t C-w"))
|
||||
:config
|
||||
(spacemacs|diminish whitespace-mode " ⓦ" " w")))
|
||||
(progn
|
||||
(set-face-attribute 'whitespace-space nil
|
||||
:background nil
|
||||
:foreground (face-attribute 'font-lock-warning-face :foreground))
|
||||
(set-face-attribute 'whitespace-tab nil
|
||||
:background nil)
|
||||
(set-face-attribute 'whitespace-indentation nil
|
||||
:background nil)
|
||||
(spacemacs|diminish whitespace-mode " ⓦ" " w"))))
|
||||
|
||||
(defun spacemacs/init-window-numbering ()
|
||||
(use-package window-numbering
|
||||
|
|
Loading…
Reference in a new issue