2

I have tried M-x whitespace-mode but it does not do anything.

2
  • It seems like doom emacs have specific logic for whitespace-mode: doom-highlight-non-default-indentation-h, try to override this and enable whitespace-mode? (advice-add #'doom-highlight-non-default-indentation-h :override #'ignore) Mar 6, 2022 at 2:00
  • What is the value of whitespace-style?
    – NickD
    Mar 7, 2022 at 2:27

1 Answer 1

0

The following snippet worked for me:

;; source: https://tech.tonyballantyne.com/2023/01/23/whitespace-mode/
(use-package! whitespace
  :config
  (setq
    whitespace-style '(face tabs tab-mark spaces space-mark trailing newline newline-mark)
    whitespace-display-mappings '(
      (space-mark   ?\     [?\u00B7]     [?.])
      (space-mark   ?\xA0  [?\u00A4]     [?_])
      (newline-mark ?\n    [182 ?\n])
      (tab-mark     ?\t    [?\u00BB ?\t] [?\\ ?\t])))
  (global-whitespace-mode +1))

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.