Clean up :ensure clauses in use-package calls

As `use-package-always-ensure` is `t`, we don’t need all these lines (but we
need an extra `:ensure nil` for builtins.
This commit is contained in:
Gergely Polonkai 2017-04-19 00:31:32 +02:00
parent f9d430ff8b
commit 224f200756

212
init.el
View File

@ -76,7 +76,6 @@
(require 'thingatpt) (require 'thingatpt)
(use-package helm (use-package helm
:ensure t
:init :init
(require 'helm-config) (require 'helm-config)
(setq helm-M-x-fuzzy-match t (setq helm-M-x-fuzzy-match t
@ -93,12 +92,10 @@
("/" . gpolonkai/helm-ff-slash-dir-complete))) ("/" . gpolonkai/helm-ff-slash-dir-complete)))
(use-package helm-swoop (use-package helm-swoop
:ensure t
:bind :bind
(("M-i" . helm-swoop))) (("M-i" . helm-swoop)))
(use-package ggtags (use-package ggtags
:ensure t
:config :config
(add-hook 'c-mode-hook (add-hook 'c-mode-hook
(lambda () (lambda ()
@ -109,7 +106,6 @@
(ggtags-mode t))))) (ggtags-mode t)))))
(use-package helm-gtags (use-package helm-gtags
:ensure t
:init :init
(setq-default helm-gtags-auto-update t (setq-default helm-gtags-auto-update t
helm-gtags-ignore-case t helm-gtags-ignore-case t
@ -141,7 +137,6 @@
;; Multiple cursors ;; Multiple cursors
(use-package multiple-cursors (use-package multiple-cursors
:ensure t
:config :config
(add-hook 'multiple-cursors-mode-enabled-hook (add-hook 'multiple-cursors-mode-enabled-hook
(lambda () (lambda ()
@ -175,7 +170,6 @@
;; Nyanyanyanyanya ;; Nyanyanyanyanya
(use-package nyan-mode (use-package nyan-mode
:ensure t
:init :init
(setq-default nyan-animate-nyancat t (setq-default nyan-animate-nyancat t
nyan-wavy-trail t) nyan-wavy-trail t)
@ -184,14 +178,12 @@
(when (display-graphic-p) (when (display-graphic-p)
(use-package nyan-prompt (use-package nyan-prompt
:ensure t
:config :config
(add-hook 'eshell-load-hook 'nyan-prompt-enable))) (add-hook 'eshell-load-hook 'nyan-prompt-enable)))
;; Zone! ;; Zone!
(when (display-graphic-p) (when (display-graphic-p)
(use-package zone-nyan (use-package zone-nyan
:ensure t
:after :after
zone zone
:config :config
@ -214,7 +206,6 @@
;; Magit and friends ;; Magit and friends
(use-package magit (use-package magit
:ensure t
:init :init
(setq magit-auto-revert-mode nil) (setq magit-auto-revert-mode nil)
(setq magit-last-seen-setup-instructions "1.4.0") (setq magit-last-seen-setup-instructions "1.4.0")
@ -223,19 +214,16 @@
("g" . magit-status))) ("g" . magit-status)))
(use-package magithub (use-package magithub
:ensure t
:after :after
magit) magit)
(use-package magit-gerrit (use-package magit-gerrit
:ensure t
:after :after
magit magit
:init :init
(setq-default magit-gerrit-remote "gerrit")) (setq-default magit-gerrit-remote "gerrit"))
(use-package origami (use-package origami
:ensure t
:demand :demand
:config :config
(define-prefix-command 'origami-mode-map) (define-prefix-command 'origami-mode-map)
@ -257,13 +245,11 @@
("x" . origami-reset))) ("x" . origami-reset)))
(use-package helm-ag (use-package helm-ag
:ensure t
:bind :bind
(:map gpolonkai/pers-map (:map gpolonkai/pers-map
("s" . helm-do-ag))) ("s" . helm-do-ag)))
(use-package smartparens (use-package smartparens
:ensure t
:demand :demand
:config :config
(show-smartparens-global-mode t) (show-smartparens-global-mode t)
@ -277,7 +263,6 @@
("C-c s k" . sp-kill-sexp))) ("C-c s k" . sp-kill-sexp)))
(use-package smart-mode-line (use-package smart-mode-line
:ensure t
:after :after
org org
:config :config
@ -316,13 +301,11 @@
) )
(use-package company (use-package company
:ensure t
:config :config
(setq company-idle-delay nil) (setq company-idle-delay nil)
(global-company-mode)) (global-company-mode))
(use-package helm-company (use-package helm-company
:ensure t
:after :after
company company
helm helm
@ -333,19 +316,16 @@
("C-c j" . helm-company))) ("C-c j" . helm-company)))
(use-package projectile (use-package projectile
:ensure t
:config :config
(projectile-global-mode t)) (projectile-global-mode t))
(use-package helm-projectile (use-package helm-projectile
:ensure t
:init :init
(setq projectile-completion-system 'helm) (setq projectile-completion-system 'helm)
:config :config
(helm-projectile-on)) (helm-projectile-on))
(use-package drag-stuff (use-package drag-stuff
:ensure t
:config :config
(drag-stuff-global-mode t) (drag-stuff-global-mode t)
(drag-stuff-define-keys)) (drag-stuff-define-keys))
@ -357,7 +337,6 @@
"git-gutter-fringe" "git-gutter-fringe"
"git-gutter"))) "git-gutter")))
(eval `(use-package ,gitgutter-package (eval `(use-package ,gitgutter-package
:ensure t
:demand :demand
:config :config
(global-git-gutter-mode t) (global-git-gutter-mode t)
@ -391,7 +370,6 @@
;; Org mode ;; Org mode
(use-package org (use-package org
:ensure t
:demand :demand
:init :init
(require 'xdg-paths) (require 'xdg-paths)
@ -457,7 +435,6 @@
("C-e" . gpolonkai/move-to-end-of-line))) ("C-e" . gpolonkai/move-to-end-of-line)))
(use-package org-bullets (use-package org-bullets
:ensure t
:init :init
(add-hook 'org-mode-hook (add-hook 'org-mode-hook
(lambda () (lambda ()
@ -465,14 +442,12 @@
;; Waka-waka ;; Waka-waka
(use-package wakatime-mode (use-package wakatime-mode
:ensure t
:init :init
(setq-default wakatime-cli-path (executable-find "wakatime")) (setq-default wakatime-cli-path (executable-find "wakatime"))
:config :config
(global-wakatime-mode t)) (global-wakatime-mode t))
(use-package ace-window (use-package ace-window
:ensure t
:config :config
(setq aw-background nil (setq aw-background nil
aw-dispatch-always t) aw-dispatch-always t)
@ -490,7 +465,6 @@
("o" . ace-window))) ("o" . ace-window)))
(use-package avy (use-package avy
:ensure t
:demand :demand
:config :config
(avy-setup-default) (avy-setup-default)
@ -502,100 +476,75 @@
("M-g e" . avy-goto-word-0))) ("M-g e" . avy-goto-word-0)))
(use-package diminish (use-package diminish
:ensure t
:defer t) :defer t)
(use-package focus (use-package focus
:ensure t
:bind :bind
(([f8] . focus-mode))) (([f8] . focus-mode)))
(use-package coffee-mode (use-package coffee-mode)
:ensure t)
(use-package command-log-mode (use-package command-log-mode)
:ensure t)
(use-package company-c-headers (use-package company-c-headers)
:ensure t)
(use-package company-shell (use-package company-shell)
:ensure t)
(use-package electric-case (use-package electric-case
:ensure t
:config :config
(add-hook 'c-mode-hook 'electric-case-c-init)) (add-hook 'c-mode-hook 'electric-case-c-init))
(use-package electric-spacing (use-package electric-spacing
:ensure t
:pin gnu :pin gnu
:config :config
(add-hook 'c-mode-common-hook 'electric-spacing-mode)) (add-hook 'c-mode-common-hook 'electric-spacing-mode))
(use-package emamux (use-package emamux)
:ensure t)
(use-package flycheck (use-package flycheck)
:ensure t)
(use-package flycheck-pkg-config (use-package flycheck-pkg-config)
:ensure t)
(use-package git-messenger (use-package git-messenger
:ensure t
:bind :bind
(:map gpolonkai/pers-map (:map gpolonkai/pers-map
("gm" . git-messenger:popup-message))) ("gm" . git-messenger:popup-message)))
(use-package git-timemachine (use-package git-timemachine
:ensure t
:bind :bind
(([f6] . git-timemachine-toggle))) (([f6] . git-timemachine-toggle)))
(use-package gitconfig-mode (use-package gitconfig-mode)
:ensure t)
(use-package gitignore-mode (use-package gitignore-mode)
:ensure t)
(use-package gnugo (use-package gnugo)
:ensure t)
(use-package gobgen (use-package gobgen)
:ensure t)
(use-package goto-last-change (use-package goto-last-change
:ensure t
:bind :bind
(("M-g /" . goto-last-change))) (("M-g /" . goto-last-change)))
(use-package helm-chrome (use-package helm-chrome)
:ensure t)
(use-package helm-flycheck (use-package helm-flycheck)
:ensure t)
(use-package helm-flyspell (use-package helm-flyspell
:ensure t
:demand :demand
:bind :bind
(:map flyspell-mode-map (:map flyspell-mode-map
("C-M-i" . helm-flyspell-correct))) ("C-M-i" . helm-flyspell-correct)))
(use-package helm-github-stars (use-package helm-github-stars
:ensure t
:init :init
(setq-default helm-github-stars-username "gergelypolonkai")) (setq-default helm-github-stars-username "gergelypolonkai"))
(use-package helm-google (use-package helm-google)
:ensure t)
(use-package hyde (use-package hyde)
:ensure t)
(use-package id-manager (use-package id-manager
:ensure t
:config :config
(load "idm") (load "idm")
(setq idm-database-file (expand-file-name "idm-db.gpg" user-emacs-directory)) (setq idm-database-file (expand-file-name "idm-db.gpg" user-emacs-directory))
@ -603,87 +552,68 @@
(:map gpolonkai/pers-map (:map gpolonkai/pers-map
("i" . idm-open-list-command))) ("i" . idm-open-list-command)))
(use-package identica-mode (use-package identica-mode)
:ensure t)
(use-package jinja2-mode (use-package jinja2-mode)
:ensure t)
(use-package js2-mode (use-package js2-mode
:ensure t
:pin melpa-stable) :pin melpa-stable)
(use-package json-mode (use-package json-mode)
:ensure t)
(use-package markdown-mode (use-package markdown-mode
:ensure t
:config :config
(push '("\\.markdown\\'" . markdown-mode) auto-mode-alist) (push '("\\.markdown\\'" . markdown-mode) auto-mode-alist)
(push '("\\.md\\'" . markdown-mode) auto-mode-alist)) (push '("\\.md\\'" . markdown-mode) auto-mode-alist))
(use-package mc-extras (use-package mc-extras
:ensure t
:demand :demand
:bind :bind
(:map mc/keymap (:map mc/keymap
("C-c m =" . mc/compare-chars))) ("C-c m =" . mc/compare-chars)))
(use-package ng2-mode (use-package ng2-mode)
:ensure t)
(use-package org-projectile (use-package org-projectile)
:ensure t)
(use-package sass-mode (use-package sass-mode)
:ensure t)
(use-package smart-mode-line-powerline-theme (use-package smart-mode-line-powerline-theme
:ensure t
:init :init
(setq-default sml/theme 'powerline)) (setq-default sml/theme 'powerline))
(use-package spinner (use-package spinner)
:ensure t)
(use-package sx (use-package sx
:ensure t
:demand :demand
:bind :bind
(:map gpolonkai/pers-map (:map gpolonkai/pers-map
("qi" . sx-inbox) ("qi" . sx-inbox)
("qs" . sx-search))) ("qs" . sx-search)))
(use-package typescript-mode (use-package typescript-mode)
:ensure t)
(use-package vala-mode (use-package vala-mode
:ensure t
:init :init
(add-to-list 'auto-mode-alist '("\\.vala\\'" . vala-mode))) (add-to-list 'auto-mode-alist '("\\.vala\\'" . vala-mode)))
(use-package xlicense (use-package xlicense)
:ensure t)
(use-package yaml-mode (use-package yaml-mode
:ensure t
:init :init
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))) (add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode)))
(use-package helm-smex (use-package helm-smex
:ensure t
:bind :bind
(("M-S-x" . helm-smex))) (("M-S-x" . helm-smex)))
(use-package ediff (use-package ediff
:ensure t
:init :init
(setq-default ediff-merge-split-window-function 'split-window-horizontally (setq-default ediff-merge-split-window-function 'split-window-horizontally
ediff-split-window-function 'split-window-vertically ediff-split-window-function 'split-window-vertically
ediff-window-setup-function 'ediff-setup-windows-plain)) ediff-window-setup-function 'ediff-setup-windows-plain))
(use-package plantuml-mode (use-package plantuml-mode
:ensure t
:init :init
(setq plantuml-jar-path (setq plantuml-jar-path
(expand-file-name (expand-file-name
@ -701,7 +631,6 @@
'((plantuml . t)))) '((plantuml . t))))
(use-package org-random-todo (use-package org-random-todo
:ensure t
:demand :demand
:config :config
;; Dont bug me too often… ;; Dont bug me too often…
@ -711,6 +640,7 @@
("r" . org-random-todo))) ("r" . org-random-todo)))
(use-package calendar (use-package calendar
:ensure nil
:init :init
(setq calendar-week-start-day 1 (setq calendar-week-start-day 1
calendar-latitude 47.4 calendar-latitude 47.4
@ -721,7 +651,6 @@
calendar-daylight-time-zone-name "CEST")) calendar-daylight-time-zone-name "CEST"))
(use-package yasnippet (use-package yasnippet
:ensure t
:demand :demand
:config :config
(yas-global-mode 1) (yas-global-mode 1)
@ -732,17 +661,14 @@
([(tab)] . nil))) ([(tab)] . nil)))
(use-package vala-snippets (use-package vala-snippets
:ensure t
:after :after
yasnippet) yasnippet)
(use-package hungarian-holidays (use-package hungarian-holidays
:ensure t
:config :config
(hungarian-holidays-add)) (hungarian-holidays-add))
(use-package beacon (use-package beacon
:ensure t
:demand :demand
:config :config
(beacon-mode 1) (beacon-mode 1)
@ -757,31 +683,26 @@
(add-hook 'text-mode-hook (add-hook 'text-mode-hook
'flyspell-mode)) 'flyspell-mode))
(use-package helm-descbinds (use-package helm-descbinds)
:ensure t)
(use-package helm-describe-modes (use-package helm-describe-modes)
:ensure t)
(use-package autorevert (use-package autorevert
:config :config
(global-auto-revert-mode 1)) (global-auto-revert-mode 1))
(use-package rainbow-delimiters (use-package rainbow-delimiters
:ensure t
:config :config
(add-hook 'prog-mode-hook (add-hook 'prog-mode-hook
#'rainbow-delimiters-mode)) #'rainbow-delimiters-mode))
(use-package rainbow-mode (use-package rainbow-mode
:ensure t
:config :config
(add-hook 'css-mode-hook 'rainbow-mode) (add-hook 'css-mode-hook 'rainbow-mode)
(add-hook 'scss-mode-hook 'rainbow-mode) (add-hook 'scss-mode-hook 'rainbow-mode)
(add-hook 'sass-mode 'rainbow-mode)) (add-hook 'sass-mode 'rainbow-mode))
(use-package hungry-delete (use-package hungry-delete
:ensure t
:config :config
(global-hungry-delete-mode)) (global-hungry-delete-mode))
@ -798,17 +719,13 @@
;; This seems to be the default, but lets make sure… ;; This seems to be the default, but lets make sure…
(electric-indent-mode 1)) (electric-indent-mode 1))
(use-package restclient (use-package restclient)
:ensure t)
(use-package company-restclient (use-package company-restclient)
:ensure t)
(use-package restclient-helm (use-package restclient-helm)
:ensure t)
(use-package alert (use-package alert
:ensure t
:config :config
(setq alert-default-style (setq alert-default-style
(if (termux-p) (if (termux-p)
@ -865,8 +782,7 @@ INFO plist."
(:map gpolonkai/pers-map (:map gpolonkai/pers-map
("n" . newsticker-show-news))) ("n" . newsticker-show-news)))
(use-package cheatsheet (use-package cheatsheet)
:ensure t)
(use-package nxml-mode (use-package nxml-mode
:ensure nil :ensure nil
@ -895,7 +811,6 @@ INFO plist."
frame 'prepend)))) frame 'prepend))))
(use-package company-emoji (use-package company-emoji
:ensure t
:after :after
company company
:init :init
@ -906,7 +821,6 @@ INFO plist."
'--set-emoji-font)) '--set-emoji-font))
(use-package zygospore (use-package zygospore
:ensure t
:bind :bind
(:map ctl-x-map (:map ctl-x-map
("1" . zygospore-toggle-delete-other-windows))) ("1" . zygospore-toggle-delete-other-windows)))
@ -924,28 +838,22 @@ INFO plist."
(setq which-func-unknown "")) (setq which-func-unknown ""))
(use-package ace-popup-menu (use-package ace-popup-menu
:ensure t
:config :config
(ace-popup-menu-mode 1)) (ace-popup-menu-mode 1))
(use-package bind-key (use-package bind-key)
:ensure t)
(use-package kanban (use-package kanban)
:ensure t)
(use-package achievements (use-package achievements
:ensure t
:config :config
(achievements-mode 1)) (achievements-mode 1))
(use-package auto-highlight-symbol (use-package auto-highlight-symbol
:ensure t
:config :config
(global-auto-highlight-symbol-mode t)) (global-auto-highlight-symbol-mode t))
(use-package auto-package-update (use-package auto-package-update
:ensure t
:config :config
(setq auto-package-update-interval 7 (setq auto-package-update-interval 7
auto-package-update-delete-old-versions t) auto-package-update-delete-old-versions t)
@ -961,37 +869,30 @@ INFO plist."
(:map gpolonkai/pers-map (:map gpolonkai/pers-map
("k" . cookie))) ("k" . cookie)))
(use-package ace-mc (use-package ace-mc)
:ensure t)
(use-package dired-k (use-package dired-k
:ensure t
:bind :bind
(:map dired-mode-map (:map dired-mode-map
("K" . dired-k))) ("K" . dired-k)))
(use-package form-feed (use-package form-feed
:ensure t
:config :config
(add-hook 'emacs-lisp-mode-hook 'form-feed-mode)) (add-hook 'emacs-lisp-mode-hook 'form-feed-mode))
(use-package anzu (use-package anzu
:ensure t
:config :config
(global-anzu-mode 1)) (global-anzu-mode 1))
(use-package auto-virtualenv (use-package auto-virtualenv
:ensure t
:config :config
(add-hook 'python-mode-hook 'auto-virtualenv-set-virtualenv) (add-hook 'python-mode-hook 'auto-virtualenv-set-virtualenv)
(add-hook 'projectile-after-switch-project-hook (add-hook 'projectile-after-switch-project-hook
'auto-virtualenv-set-virtualenv)) 'auto-virtualenv-set-virtualenv))
(use-package flymake-python-pyflakes (use-package flymake-python-pyflakes)
:ensure t)
(use-package gitlab (use-package gitlab)
:ensure t)
(use-package files (use-package files
:ensure nil :ensure nil
@ -1002,35 +903,28 @@ INFO plist."
`((".*" ,temporary-file-directory t)))) `((".*" ,temporary-file-directory t))))
(use-package helm-c-yasnippet (use-package helm-c-yasnippet
:ensure t
:demand t :demand t
:config :config
(setq helm-yas-space-match-any-greedy t) (setq helm-yas-space-match-any-greedy t)
:bind :bind
(("C-c y" . helm-yas-complete))) (("C-c y" . helm-yas-complete)))
(use-package helm-hunks (use-package helm-hunks)
:ensure t)
(use-package helm-pydoc (use-package helm-pydoc)
:ensure t)
(use-package hl-todo (use-package hl-todo)
:ensure t)
(use-package glasses (use-package glasses
:ensure t
:config :config
(add-hook 'prog-mode-hook 'glasses-mode)) (add-hook 'prog-mode-hook 'glasses-mode))
(when (display-graphic-p) (when (display-graphic-p)
(use-package eshell-fringe-status (use-package eshell-fringe-status
:ensure t
:config :config
(add-hook 'eshell-mode-hook 'eshell-fringe-status-mode))) (add-hook 'eshell-mode-hook 'eshell-fringe-status-mode)))
(use-package eshell-prompt-extras (use-package eshell-prompt-extras
:ensure t
:config :config
(with-eval-after-load "esh-opt" (with-eval-after-load "esh-opt"
(autoload 'epe-theme-lambda "eshell-prompt-extras") (autoload 'epe-theme-lambda "eshell-prompt-extras")
@ -1038,26 +932,22 @@ INFO plist."
eshell-prompt-function 'epe-theme-lambda))) eshell-prompt-function 'epe-theme-lambda)))
(use-package expand-region (use-package expand-region
:ensure t
:bind :bind
(:map ctl-x-map (:map ctl-x-map
("*" . er/expand-region))) ("*" . er/expand-region)))
(use-package anaconda-mode (use-package anaconda-mode
:ensure t
:config :config
(add-hook 'python-mode-hook 'anaconda-mode) (add-hook 'python-mode-hook 'anaconda-mode)
(add-hook 'python-mode-hook 'anaconda-eldoc-mode)) (add-hook 'python-mode-hook 'anaconda-eldoc-mode))
(use-package company-anaconda (use-package company-anaconda
:ensure t
:after :after
company company
:config :config
(add-to-list 'company-backends 'company-anaconda)) (add-to-list 'company-backends 'company-anaconda))
(use-package mediawiki (use-package mediawiki
:ensure t
:after :after
id-manager id-manager
:config :config
@ -1068,56 +958,44 @@ INFO plist."
(gpolonkai/idm-get-password-for-account "WikEmacs")))) (gpolonkai/idm-get-password-for-account "WikEmacs"))))
(use-package github-notifier (use-package github-notifier
:ensure t
:after :after
id-manager id-manager
:config :config
(setq github-notifier-token (gpolonkai/idm-get-password-for-account "GitHub")) (setq github-notifier-token (gpolonkai/idm-get-password-for-account "GitHub"))
(github-notifier-mode)) (github-notifier-mode))
(use-package gist (use-package gist)
:ensure t)
(use-package company-web (use-package company-web
:ensure t
:config :config
(require 'company-web-html)) (require 'company-web-html))
(use-package enlive (use-package enlive)
:ensure t)
(use-package po-mode (use-package po-mode)
:ensure t)
(use-package dashboard (use-package dashboard
:ensure t
:after :after
projectile projectile
:config :config
(add-to-list 'dashboard-items '(projects . 5) t) (add-to-list 'dashboard-items '(projects . 5) t)
(dashboard-setup-startup-hook)) (dashboard-setup-startup-hook))
(use-package csharp-mode (use-package csharp-mode)
:ensure t)
(use-package web-mode (use-package web-mode
:ensure t
:config :config
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))) (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)))
(use-package dockerfile-mode (use-package dockerfile-mode)
:ensure t)
(use-package phi-search (use-package phi-search)
:ensure t)
(use-package phi-search-mc (use-package phi-search-mc
:ensure t
:config :config
(phi-search-mc/setup-keys)) (phi-search-mc/setup-keys))
(use-package secretaria (use-package secretaria
:ensure t
:after :after
alert alert
:config :config