Move mode switches to use-package :init

This commit is contained in:
Wojciech Kozlowski 2017-08-28 22:17:11 +01:00
parent 09a339839b
commit dffe201b1d
5 changed files with 16 additions and 14 deletions

View File

@ -61,15 +61,17 @@
;; Volatile highlights - highlight changes caused by undo, yank, etc.
;; --------------------------------------------------------------------------
(use-package volatile-highlights)
(volatile-highlights-mode t)
(use-package volatile-highlights
:init
(volatile-highlights-mode t))
;; --------------------------------------------------------------------------
;; Undo tree. To undo "C-\", to redo "C-_", undo tree "C-x u".
;; --------------------------------------------------------------------------
(use-package undo-tree)
(global-undo-tree-mode)
(use-package undo-tree
:init
(global-undo-tree-mode))
;; --------------------------------------------------------------------------
;; Use UTF-8.

View File

@ -28,6 +28,8 @@
(defun init-packages/init-helm ()
(use-package helm
:init
(helm-mode 1)
:bind
(("C-x C-f" . helm-find-files)
("M-x" . helm-M-x)
@ -119,6 +121,4 @@
)
(helm-mode 1)
)

View File

@ -49,6 +49,9 @@
(add-hook 'prog-mode-hook 'highlight-parentheses-mode))
(use-package smartparens
:init
(smartparens-global-mode t)
(show-smartparens-global-mode t)
:config
(require 'smartparens-config)
@ -109,7 +112,4 @@
;; Do not highlight space between parentheses.
sp-highlight-pair-overlay nil))
(smartparens-global-mode t)
(show-smartparens-global-mode t)
)

View File

@ -43,8 +43,9 @@
;; Enable yasnippet.
;; --------------------------------------------------------------------------
(use-package yasnippet)
(yas-global-mode 1)
(use-package yasnippet
:init
(yas-global-mode 1))
;; --------------------------------------------------------------------------
;; Automatically indent yanked text in programming mode.

View File

@ -31,12 +31,11 @@
;; --------------------------------------------------------------------------
(use-package workgroups2
:init
(workgroups-mode 1)
:config
;; Don't save. Workgroups are transient to the session.
(setq wg-emacs-exit-save-behavior nil)
(setq wg-workgroups-mode-exit-save-behavior nil))
;; Enable workgroups mode.
(workgroups-mode 1)
)