Emacs: use-package: better defer handling

This commit is contained in:
Marcel Kapfer 2018-02-23 09:45:50 +01:00
parent 1b178fb403
commit 4ffe1ea18d
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -257,14 +257,11 @@
;; expand-region ;; expand-region
;; Increase selected region by semantic units. ;; Increase selected region by semantic units.
(use-package expand-region (use-package expand-region
:config :bind (("C-=" . er/expand-region)))
(global-set-key (kbd "C-=") 'er/expand-region))
;; dired+ ;; dired+
;; Extensions to Dired ;; Extensions to Dired
(use-package dired+ (use-package dired+)
:config
(require 'dired+))
;; projectile ;; projectile
;; Manage and navigate projects in Emacs easily ;; Manage and navigate projects in Emacs easily
@ -324,6 +321,7 @@
;; mu4e-alert ;; mu4e-alert
;; Desktop notification for mu4e ;; Desktop notification for mu4e
(use-package mu4e-alert (use-package mu4e-alert
:after (mu4e)
:config :config
(mu4e-alert-set-default-style 'libnotify) (mu4e-alert-set-default-style 'libnotify)
:hook :hook
@ -421,14 +419,13 @@
;; diff-hl ;; diff-hl
;; Highlight uncommitted changes using VC ;; Highlight uncommitted changes using VC
(use-package diff-hl (use-package diff-hl
:config :defer nil
(global-diff-hl-mode t) :config (global-diff-hl-mode t)
:hook (magit-post-refresh-hook . diff-hl-magit-post-refresh)) :hook (magit-post-refresh-hook . diff-hl-magit-post-refresh))
;; treemacs ;; treemacs
;; A tree style file explorer package ;; A tree style file explorer package
(use-package treemacs (use-package treemacs
:defer t
:init :init
(define-prefix-command 'treemacs-map) (define-prefix-command 'treemacs-map)
(global-set-key (kbd "M-m") 'treemacs-map) (global-set-key (kbd "M-m") 'treemacs-map)
@ -461,7 +458,7 @@
;; treemacs-projectile ;; treemacs-projectile
;; Projectile integration for treemacs ;; Projectile integration for treemacs
(use-package treemacs-projectile (use-package treemacs-projectile
:defer t :after treemacs
:config :config
(setq treemacs-header-function #'treemacs-projectile-create-header) (setq treemacs-header-function #'treemacs-projectile-create-header)
:bind :bind
@ -560,8 +557,9 @@
;; counsel-projectile ;; counsel-projectile
;; Ivy UI for Projectile ;; Ivy UI for Projectile
(use-package counsel-projectile (use-package counsel-projectile
:after (projectile)
:config :config
(counsel-projectile-on)) (counsel-projectile-mode))
;; avy ;; avy
;; Jump to arbitrary positions in visible text and select text quickly. ;; Jump to arbitrary positions in visible text and select text quickly.
@ -613,6 +611,8 @@
(append '((company-math-symbols-latex company-latex-commands)) (append '((company-math-symbols-latex company-latex-commands))
company-backends))))) company-backends)))))
(use-package company-shell
:after (company shell-mode))
;; beginend ;; beginend
;; Redefine M-< and M-> for some modes ;; Redefine M-< and M-> for some modes
@ -671,7 +671,8 @@
;; focus ;; focus
;; Dim the font color of text in surrounding sections ;; Dim the font color of text in surrounding sections
(use-package focus) (use-package focus
:defer t)
;; phpunit ;; phpunit
;; Launch PHP unit tests using phpunit ;; Launch PHP unit tests using phpunit
@ -692,7 +693,8 @@
;; easy-hugo ;; easy-hugo
;; Write blogs made with hugo by markdown or org-mode ;; Write blogs made with hugo by markdown or org-mode
(use-package easy-hugo) (use-package easy-hugo
:defer t)
;; stumpwm-mode ;; stumpwm-mode
;; special lisp mode for evaluating code into running stumpwm ;; special lisp mode for evaluating code into running stumpwm
@ -908,7 +910,6 @@
;; bug-hunter ;; bug-hunter
;; Hunt down errors by bisecting elisp files ;; Hunt down errors by bisecting elisp files
(use-package bug-hunter)
;; desktop ;; desktop
;; Save buffers, windows and frames ;; Save buffers, windows and frames
@ -923,21 +924,22 @@
(dolist (mode '(magit-mode magit-log-mode)) (dolist (mode '(magit-mode magit-log-mode))
(add-to-list 'desktop-modes-not-to-save mode)) (add-to-list 'desktop-modes-not-to-save mode))
(add-to-list 'desktop-files-not-to-save (rx bos "COMMIT_EDITMSG"))) (add-to-list 'desktop-files-not-to-save (rx bos "COMMIT_EDITMSG")))
(use-package bug-hunter
:defer t)
;; hl-todo ;; hl-todo
;; highlight TODOs and similar keywords ;; highlight TODOs and similar keywords
(use-package hl-todo (use-package hl-todo
:defer t
:init (global-hl-todo-mode)) :init (global-hl-todo-mode))
;; yasnippets ;; yasnippets
;; Yet another snippet extension for Emacs. ;; Yet another snippet extension for Emacs.
(use-package yasnippet (use-package yasnippet)
:defer t)
;; company-quickhelp ;; company-quickhelp
;; Documentation popup for Company ;; Documentation popup for Company
(use-package company-quickhelp (use-package company-quickhelp
:after (company)
:init :init
(company-quickhelp-mode 1) (company-quickhelp-mode 1)
:config :config
@ -953,7 +955,6 @@
;; Integrated environment for TeX ;; Integrated environment for TeX
(use-package tex (use-package tex
:ensure auctex :ensure auctex
:defer t
:config :config
(setq (setq
;; Parse file after loading it if no style hook is found for it. ;; Parse file after loading it if no style hook is found for it.
@ -978,7 +979,6 @@
;; Integrated environment for TeX ;; Integrated environment for TeX
(use-package tex-buf (use-package tex-buf
:ensure auctex :ensure auctex
:defer t
;; Don't ask for confirmation when saving before processing ;; Don't ask for confirmation when saving before processing
:config (setq TeX-save-query nil)) :config (setq TeX-save-query nil))
@ -986,7 +986,6 @@
;; Integrated environment for TeX ;; Integrated environment for TeX
(use-package tex-style (use-package tex-style
:ensure auctex :ensure auctex
:defer t
:config :config
;; Enable support for csquotes ;; Enable support for csquotes
(setq LaTeX-csquotes-close-quote "}" (setq LaTeX-csquotes-close-quote "}"
@ -996,20 +995,18 @@
;; Integrated environment for TeX ;; Integrated environment for TeX
(use-package tex-fold (use-package tex-fold
:ensure auctex :ensure auctex
:defer t
:init (add-hook 'TeX-mode-hook #'TeX-fold-mode)) :init (add-hook 'TeX-mode-hook #'TeX-fold-mode))
;; LaTeX with AUCTeX ;; LaTeX with AUCTeX
;; Integrated environment for TeX ;; Integrated environment for TeX
(use-package tex-mode (use-package tex-mode
:ensure auctex :ensure auctex)
:defer t)
;; LaTeX with AUCTeX ;; LaTeX with AUCTeX
;; Integrated environment for TeX ;; Integrated environment for TeX
(use-package latex (use-package latex
:ensure auctex :ensure auctex
:defer t :defer nil
:config :config
;; No language-specific hyphens please ;; No language-specific hyphens please
(setq LaTeX-babel-hyphen nil) (setq LaTeX-babel-hyphen nil)
@ -1035,7 +1032,6 @@
;; bibtex ;; bibtex
;; BibTeX editing ;; BibTeX editing
(use-package bibtex (use-package bibtex
:defer t
:config :config
;; Run prog mode hooks for bibtex ;; Run prog mode hooks for bibtex
@ -1047,7 +1043,6 @@
;; reftex ;; reftex
;; TeX cross-reference management ;; TeX cross-reference management
(use-package reftex (use-package reftex
:defer t
:diminish reftex-mode :diminish reftex-mode
:init (add-hook 'LaTeX-mode-hook #'reftex-mode) :init (add-hook 'LaTeX-mode-hook #'reftex-mode)
:config :config
@ -1060,7 +1055,6 @@
;; term / ansi-term ;; term / ansi-term
;; terminal in emacs ;; terminal in emacs
(use-package term (use-package term
:defer t
:init (defalias 'sh 'ansi-term) :init (defalias 'sh 'ansi-term)
:config :config
;; set default shell ;; set default shell