Move whitespace config to use-package

Also reconfigure it so it can be toggled with F10 (maybe not the best
choice)
This commit is contained in:
Gergely Polonkai 2016-10-10 15:30:24 +02:00
parent 4363735efc
commit 17d2af4ebf
1 changed files with 9 additions and 2 deletions

11
init.el
View File

@ -188,7 +188,6 @@
(setq user-mail-address "gergely@polonkai.eu") (setq user-mail-address "gergely@polonkai.eu")
;; Load some custom libraries ;; Load some custom libraries
(require 'whitespace)
(require 'thingatpt) (require 'thingatpt)
(require 'helm-config) (require 'helm-config)
(require 'xlicense) (require 'xlicense)
@ -198,6 +197,15 @@
(require 'zone) (require 'zone)
(require 'magithub) (require 'magithub)
(require 'origami) (require 'origami)
;; Whitespace mode
;;
;; It is turned on by default, and can be toggled with F10
(use-package whitespace
:config
(global-whitespace-mode t)
:bind
(([f10] . global-whitespace-mode)))
(use-package smartparens-config (use-package smartparens-config
:ensure smartparens :ensure smartparens
:config :config
@ -343,7 +351,6 @@
(define-key origami-mode-map (kbd "x") 'origami-reset) (define-key origami-mode-map (kbd "x") 'origami-reset)
;; Set up some global minor modes ;; Set up some global minor modes
(global-whitespace-mode 1)
(add-hook 'after-init-hook 'global-company-mode) (add-hook 'after-init-hook 'global-company-mode)
(global-origami-mode t) (global-origami-mode t)
(show-paren-mode t) (show-paren-mode t)