summary refs log tree commit diff
path: root/config/init-whitespace.el
blob: 14533ad207272343be42a29632d924df42a8fc91 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
;;; init-whitespace.el --- configure whitespace -*- lexical-binding: t -*-
;; Author: Franck Cuny <franck@fcuny.net>

;;; Commentary:

;; configure whitespace

;;; Code:

(use-package whitespace
  :diminish (global-whitespace-mode
             whitespace-mode
             whitespace-newline-mode)
  :commands (whitespace-buffer
             whitespace-cleanup
             whitespace-mode
             whitespace-turn-off)
  :init
  (dolist (hook '(prog-mode-hook text-mode-hook))
    (add-hook hook #'whitespace-mode))
  :custom
  (whitespace-auto-cleanup t t)
  (whitespace-rescan-timer-time nil t)
  (whitespace-silent t t)
  (whitespace-style '(face trailing space-before-tab))
  :defines
  (whitespace-auto-cleanup
   whitespace-rescan-timer-time
   whitespace-silent))

(provide 'init-whitespace)

;;; init-whitespace.el ends here