I've enabled whitespace-mode and I'm correctly able to see my spaces, tabs, and newlines. But the spaces also show up when I receive messages from emacs (ie when I get error messages and code action suggestions from emacs).

I've included an image of the problem below. I believe the relevant minor modes that the whitespaces' issue is occurring in are: lsp-mode (for the code actions), and flycheck-mode (for suggestions).

How can I, inside flycheck-mode and lsp-mode turn off whitespace-mode? (and, if possible, inside any future emacs mode that'll send me messages)

The only whitespace-mode settings in my config.el are:

(global-whitespace-mode 1)
(setq whitespace-display-mappings
    (space-mark   ?\     [?·] [?.])
    (newline-mark ?\n    [?$ ?\n])
    (tab-mark     ?\t    [?\u00BB ?\t] [?\\ ?\t])
(setq whitespace-style (quote (face spaces tabs newline space-mark tab-mark newline-mark)))
(set-face-attribute 'whitespace-space nil :background nil :foreground "#2e3138") 
(set-face-attribute 'whitespace-tab nil :background nil :foreground "#2e3138")
(set-face-attribute 'whitespace-newline nil :background nil :foreground "#2e3138")

enter image description here

ps: The code is intentionally wrong, I just wanted to demonstrate what I see

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.