doom: Only enable tab/space display in visual mode

This commit is contained in:
Alex Palaistras 2022-09-29 13:12:39 +01:00
parent 5793d40d46
commit 20240c603c
1 changed files with 11 additions and 1 deletions

View File

@ -14,7 +14,7 @@
(blink-cursor-mode -1)
;; Show indentation whitespace characters.
(setq whitespace-style '(face tabs tab-mark spaces space-mark trailing))
(setq whitespace-style '(face trailing))
(global-whitespace-mode 1)
;; Hide fringes.
@ -244,6 +244,16 @@
(writeroom-mode t)
(display-fill-column-indicator-mode 0))
(add-hook! 'evil-visual-state-entry-hook
(setq-local whitespace-style '(face tabs tab-mark spaces space-mark trailing))
(whitespace-turn-off)
(whitespace-turn-on-if-enabled))
(add-hook! 'evil-visual-state-exit-hook
(kill-local-variable 'whitespace-style)
(whitespace-turn-off)
(whitespace-turn-on-if-enabled))
(add-hook! git-commit-mode
(setq indent-tabs-mode nil))