Clean out uses of use-package :ensure and :diminish

Stop using :ensure and manage installed package properly so that extra
packages can be easily tested and removed. Majority use case is on
NixOS anywhere where Emacs is only configuring - not installing - the
packages

Also stop using :diminish because I don't need it with doom-modeline
anyway...
This commit is contained in:
Evie Litherland-Smith 2024-04-16 13:46:07 +01:00
parent 5b32e577e1
commit 8150864856
12 changed files with 15 additions and 137 deletions

View file

@ -6,8 +6,6 @@
* Vertico
#+begin_src emacs-lisp
(use-package vertico
:ensure t
:diminish
:custom
(vertico-cycle t)
:init
@ -19,8 +17,6 @@
* Marginalia
#+begin_src emacs-lisp
(use-package marginalia
:ensure t
:diminish
:custom
(marginalia-annotators '(marginalia-annotators-heavy
marginalia-annotators-light
@ -31,8 +27,6 @@
* Orderless
#+begin_src emacs-lisp
(use-package orderless
:ensure t
:diminish
:custom
(completion-styles '(orderless basic))
(completion-category-defaults nil)
@ -44,8 +38,6 @@
* Corfu and Cape
#+begin_src emacs-lisp
(use-package corfu
:ensure t
:diminish
:demand
:custom
(corfu-cycle t)
@ -88,9 +80,7 @@
(with-eval-after-load 'gud (add-hook 'gud-mode-hook 'my/local-corfu-no-auto)))
(use-package corfu-terminal
:ensure t
:after corfu
:diminish
:demand
:config
(corfu-terminal-mode +1))
@ -98,8 +88,6 @@
(require 'corfu)
(use-package cape
:ensure t
:diminish
:demand
:init
(add-to-list 'completion-at-point-functions #'cape-emoji)
@ -114,8 +102,6 @@
* Consult
#+begin_src emacs-lisp
(use-package consult
:ensure t
:diminish
:bind (("<remap> <imenu>" . consult-imenu)
("<remap> <switch-to-buffer>" . consult-buffer)
("<remap> <project-switch-to-buffer>" . consult-project-buffer)
@ -131,8 +117,6 @@
:config (setq completion-in-region-function #'consult-completion-in-region))
(use-package consult-eglot
:ensure t
:diminish
:after (consult eglot)
:bind (("C-c s s" . consult-eglot-symbols)))
#+end_src
@ -140,15 +124,11 @@
* Embark
#+begin_src emacs-lisp
(use-package embark
:ensure t
:diminish
:bind (("<remap> <describe-bindings>" . embark-bindings)
("C-." . embark-act))
:config (setq prefix-help-command #'embark-prefix-help-command))
(use-package embark-consult
:ensure t
:diminish
:after (embark consult)
:hook (embark-collect-mode . consult-preview-at-point-mode))
#+end_src
@ -157,8 +137,6 @@
#+begin_src emacs-lisp
;; Configure Tempel
(use-package tempel
:ensure t
:diminish
;; Require trigger prefix before template name when completing.
;; :custom
;; (tempel-trigger-prefix "<")

View file

@ -80,11 +80,6 @@
(recentf-max-saved-items 2048))
#+end_src
* diminish modes
#+begin_src emacs-lisp
(use-package diminish :ensure t)
#+end_src
* Authentication
#+begin_src emacs-lisp
(when (require 'auth-source nil :noerror)
@ -97,7 +92,6 @@
#+begin_src emacs-lisp
;; Make `describe-*' screens more helpful
(use-package helpful
:ensure t
:bind (("<remap> <describe-command>" . helpful-command)
("<remap> <describe-function>" . helpful-callable)
("<remap> <describe-key>" . helpful-key)
@ -115,14 +109,10 @@
#+begin_src emacs-lisp
;; turn on spell checking, if available.
(use-package ispell
:ensure t
:diminish
:custom
(ispell-dictionary "en_GB"))
(use-package flyspell
:ensure t
:diminish
:hook ((text-mode . flyspell-mode)
(prog-mode . flyspell-prog-mode))
:init
@ -135,15 +125,11 @@
(require 'consult-flyspell))
(use-package flyspell-correct
:ensure t
:diminish
:after flyspell
:bind ( :map flyspell-mode-map
("C-;" . flyspell-correct-wrapper)))
(use-package consult-flyspell
:ensure t
:diminish
:after (consult flyspell)
:bind ( :map flyspell-mode-map
("C-c s ;" . consult-flyspell))
@ -154,11 +140,9 @@
* ibuffer
#+begin_src emacs-lisp
(use-package ibuffer
:ensure t
:bind (("C-c b" . ibuffer)))
(use-package ibuffer-project
:ensure t
:after ibuffer
:hook ((ibuffer . (lambda ()
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
@ -169,7 +153,6 @@
* Link hint keymaps
#+begin_src emacs-lisp
(use-package link-hint
:ensure t
:bind (("C-c l o" . link-hint-open-link)
("C-c l c" . link-hint-copy-link)
("C-c l C-o" . link-hint-open-all-link)
@ -179,8 +162,6 @@
* Avy keymaps
#+begin_src emacs-lisp
(use-package avy
:ensure t
:diminish
:bind (("C-c j j" . avy-goto-char-2)
("C-c j w" . avy-goto-word-0)
("C-c j c" . avy-goto-char)
@ -190,7 +171,6 @@
* which-func config
#+begin_src emacs-lisp
(use-package which-func
:ensure t
:init (which-function-mode))
#+end_src
@ -207,7 +187,6 @@
#+begin_src emacs-lisp :tangle yes
(use-package eww
:defer t
:diminish
:custom
(browse-url-browser-function 'browse-url-default-browser)
(browse-url-new-window-flag t)

View file

@ -19,7 +19,6 @@ Manage elfeed subscriptions in an org-mode file instead of elisp.
#+begin_src emacs-lisp
(use-package elfeed-org
:ensure t
:after (elfeed org)
:custom
(rmh-elfeed-org-files
@ -34,7 +33,6 @@ Use elfeed for YouTube subscriptions, including getting video transcripts.
#+begin_src emacs-lisp
(use-package elfeed-tube
:ensure t
:after elfeed
:bind ( :map elfeed-show-mode-map
("F" . elfeed-tube-fetch)
@ -50,7 +48,6 @@ Use elfeed for YouTube subscriptions, including getting video transcripts.
(require 'elfeed-tube-mpv))
(use-package elfeed-tube-mpv
:ensure t
:after elfeed-tube
:init (require 'mpv)
:bind ( :map elfeed-show-mode-map

View file

@ -6,13 +6,9 @@
#+begin_src emacs-lisp
(use-package rainbow-delimiters
:ensure t
:diminish
:hook (prog-mode))
(use-package direnv
:ensure t
:diminish
:custom (direnv-always-show-summary nil)
:config (direnv-mode +1))
#+end_src
@ -27,12 +23,10 @@
Set treesit to fontify all elements, default was 3 (out of 4)
#+begin_src emacs-lisp
(use-package treesit
:diminish
:custom
(treesit-font-lock-level 4))
(use-package treesit-auto
:diminish
:after (treesit)
:config
(treesit-auto-add-to-auto-mode-alist)
@ -45,8 +39,6 @@ Set treesit to fontify all elements, default was 3 (out of 4)
* Eldoc
#+begin_src emacs-lisp :tangle yes
(use-package eldoc
:ensure t
:diminish
:custom
(eldoc-echo-area-display-truncation-message nil)
(eldoc-echo-area-prefer-doc-buffer t)
@ -56,8 +48,6 @@ Set treesit to fontify all elements, default was 3 (out of 4)
* Eglot LSP
#+begin_src emacs-lisp
(use-package eglot
:ensure t
:diminish
:demand
:bind (("C-c c e" . eglot)
("C-c c C-e" . eglot-reconnect)
@ -107,8 +97,6 @@ Set treesit to fontify all elements, default was 3 (out of 4)
* Apheleia formatting
#+begin_src emacs-lisp
(use-package apheleia
:ensure t
:diminish
:bind (("C-c c f" . apheleia-format-buffer))
:hook (prog-mode)
:custom (apheleia-remote-algorithm 'local)
@ -121,7 +109,6 @@ Set treesit to fontify all elements, default was 3 (out of 4)
* Flymake
#+begin_src emacs-lisp :tangle yes
(use-package flymake
:ensure t
:bind (("C-c C-." . flymake-goto-next-error)
("C-c C-," . flymake-goto-prev-error))
:hook (prog-mode . flymake-mode)
@ -131,9 +118,7 @@ Set treesit to fontify all elements, default was 3 (out of 4)
** Diagnostics in popup
#+begin_src emacs-lisp :tangle yes
(use-package flymake-popon
:ensure t
:after flymake
:diminish
:config
(global-flymake-popon-mode +1))
#+end_src
@ -141,8 +126,6 @@ Set treesit to fontify all elements, default was 3 (out of 4)
** flymake-collection
#+begin_src emacs-lisp
(use-package flymake-collection
:ensure t
:diminish
:defer
:after flymake
:custom
@ -158,36 +141,28 @@ Set treesit to fontify all elements, default was 3 (out of 4)
** shellcheck
#+begin_src emacs-lisp
(use-package flymake-shellcheck
:ensure t
:after flymake
:diminish
:hook (sh-mode . flymake-shellcheck-load))
#+end_src
** clippy
#+begin_src emacs-lisp
(use-package flymake-clippy
:ensure t
:after flymake
:diminish
:hook ((rust-mode rust-ts-mode) . flymake-clippy-setup-backend))
#+end_src
** eslint
#+begin_src emacs-lisp
(use-package flymake-eslint
:ensure t
:after flymake
:diminish
:hook (js-ts-mode . flymake-eslint-enable))
#+end_src
** ruff
#+begin_src emacs-lisp
(use-package flymake-ruff
:ensure t
:after flymake
:diminish
:hook (python-base-mode . flymake-ruff-load))
#+end_src
@ -204,8 +179,6 @@ Set treesit to fontify all elements, default was 3 (out of 4)
** Magit
#+begin_src emacs-lisp
(use-package magit
:ensure t
:diminish
:bind (("C-c g g" . magit-status)
("C-c g d" . magit-dispatch)
("C-c g f" . magit-file-dispatch)
@ -233,8 +206,6 @@ Set treesit to fontify all elements, default was 3 (out of 4)
* Aggressive Indent
#+begin_src emacs-lisp
(use-package aggressive-indent
:ensure t
:diminish
:hook (elisp-mode
lisp-mode
lisp-data-mode
@ -256,13 +227,14 @@ Set treesit to fontify all elements, default was 3 (out of 4)
** Nushell
#+begin_src emacs-lisp
(use-package nushell-ts-mode
:defer t
:mode "\\.nu\\'")
#+end_src
** Lua
#+begin_src emacs-lisp
(use-package lua-mode
:ensure t)
:defer t)
#+end_src
** Python

View file

@ -37,9 +37,3 @@
(emms-cache-enable)
(add-hook 'emms-player-started-hook #'emms-show))
#+end_src
* MPV
#+begin_src emacs-lisp
(use-package mpv
:ensure t
:diminish)
#+end_src

View file

@ -5,7 +5,6 @@
#+property: header-args:emacs-lisp :tangle yes :mkdirp yes :results output silent
#+begin_src emacs-lisp
(use-package newsticker
:ensure t
:custom
(newsticker-url-list-defaults '(("Emacs Wiki" "https://www.emacswiki.org/emacs?action=rss" nil 3600)
("LWN (Linux Weekly News)" "https://lwn.net/headlines/rss")

View file

@ -31,7 +31,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
(org-agenda-files . (:maxlevel . 2))))
(use-package org
:ensure t
:custom
(org-yank-folded-subtrees nil)
(org-yank-adjusted-subtrees t)
@ -93,9 +92,7 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
* org-roam
#+begin_src emacs-lisp
(use-package org-roam
:ensure t
:after org
:diminish
:bind (("C-c o r i" . org-roam-node-insert)
("C-c o r f" . org-roam-node-find)
("C-c o r n" . org-roam-capture))
@ -134,7 +131,7 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
#+end_src
* org-agenda
#+begin_src emacs-lisp :results output silent
(setq org-agenda-span 'day
(setq org-agenda-span 'week
org-agenda-start-on-weekday 1
org-agenda-sticky nil
org-agenda-window-setup 'current-window
@ -155,6 +152,16 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
(expand-file-name "journal" org-directory)
(expand-file-name "projects" org-directory)))
#+end_src
** iCalendar integration
#+begin_src emacs-lisp
(setopt org-icalendar-store-UID t
org-icalendar-alarm-time 15
org-icalendar-include-body t
org-icalendar-include-sexps t
org-icalendar-include-todo t
org-icalendar-combined-name "org-mode"
org-icalendar-combined-description "Emacs org-mode combined export")
#+end_src
* org-journal
#+begin_src emacs-lisp :results output silent
(use-package org-journal
@ -168,8 +175,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
* org-noter
#+begin_src emacs-lisp
(use-package org-noter
:ensure t
:diminish
:after (org doc-view)
:commands (org-noter)
:custom
@ -186,8 +191,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
* citar
#+begin_src emacs-lisp :results output silent
(use-package citar
:ensure t
:diminish
:custom
(org-cite-global-bibliography '("~/Documents/References/main.bib"))
(org-cite-insert-processor 'citar)
@ -247,8 +250,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
** Citar Embark integration
#+begin_src emacs-lisp
(use-package citar-embark
:ensure t
:diminish
:after (citar embark)
:init
(citar-embark-mode +1))

View file

@ -6,19 +6,13 @@
#+begin_src emacs-lisp
(use-package password-store
:ensure t
:defer t
:diminish)
:defer t)
(use-package password-store-otp
:ensure t
:defer t
:diminish)
:defer t)
(use-package pass
:ensure t
:defer t
:diminish
:bind (("C-c P" . pass))
:custom
(pass-show-keybindings nil)

View file

@ -7,7 +7,6 @@
#+begin_src emacs-lisp :tangle yes
(use-package tramp
:defer t
:diminish
:config
(add-to-list 'tramp-remote-path 'tramp-own-remote-path))
#+end_src

View file

@ -17,13 +17,9 @@
(add-hook 'prog-mode-hook #'(lambda () (display-line-numbers-mode +1)))
(use-package which-key
:ensure t
:diminish
:config (which-key-mode +1))
(use-package page-break-lines
:ensure t
:diminish
:config (global-page-break-lines-mode +1))
(electric-pair-mode +1)
@ -45,7 +41,6 @@
** catppuccin-theme
#+begin_src emacs-lisp
(use-package catppuccin-theme
:ensure t
:demand
:custom
(catppuccin-flavour 'mocha)
@ -81,32 +76,22 @@ Removed in favour of [[https://github.com/catppuccin/emacs][Catppuccin (emacs)]]
** nerd-icons
#+begin_src emacs-lisp
(use-package nerd-icons
:ensure t
:diminish
:config (nerd-icons-set-font "Symbols Nerd Font Mono-12"))
(use-package nerd-icons-dired
:ensure t
:after nerd-icons
:diminish
:hook (dired-mode))
(use-package nerd-icons-ibuffer
:ensure t
:after nerd-icons
:diminish
:hook (ibuffer-mode))
(use-package nerd-icons-completion
:ensure t
:after nerd-icons
:diminish
:config (nerd-icons-completion-mode +1))
(use-package nerd-icons-corfu
:ensure t
:after (corfu nerd-icons)
:diminish
:config (add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter))
(keymap-global-set "C-c i n" #'nerd-icons-insert)
@ -114,8 +99,6 @@ Removed in favour of [[https://github.com/catppuccin/emacs][Catppuccin (emacs)]]
** Font ligatures
#+begin_src emacs-lisp
(use-package ligature
:ensure t
:diminish
:config
(ligature-set-ligatures
'(text-mode prog-mode org-mode)
@ -145,8 +128,6 @@ Removed in favour of [[https://github.com/catppuccin/emacs][Catppuccin (emacs)]]
* Notifications
#+begin_src emacs-lisp
(use-package alert
:ensure t
:diminish
:custom
(alert-default-style 'libnotify))
#+end_src
@ -163,7 +144,6 @@ Removed in favour of [[https://github.com/catppuccin/emacs][Catppuccin (emacs)]]
** doom-modeline
#+begin_src emacs-lisp
(use-package doom-modeline
:ensure t
:demand
:custom
(doom-modeline-checker-simple-format nil)
@ -194,15 +174,11 @@ Removed in favour of [[https://github.com/catppuccin/emacs][Catppuccin (emacs)]]
* Zone
#+begin_src emacs-lisp :tangle yes
(use-package zone
:ensure t
:diminish
:config (zone-when-idle (* 60 60))) ; 1 hour
#+end_src
* Git status in fringe
#+begin_src emacs-lisp
(use-package diff-hl
:ensure t
:diminish
:init
(add-hook 'magit-pre-refresh-hook #'diff-hl-magit-pre-refresh)
(add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh)

View file

@ -12,9 +12,7 @@
* windmove
#+begin_src emacs-lisp
(use-package windmove
:ensure t
:demand
:diminish
:config (windmove-mode +1)
:bind (("C-c w k" . windmove-up)
("C-c w C-k" . windmove-display-up)
@ -32,9 +30,7 @@
* winner
#+begin_src emacs-lisp
(use-package winner
:ensure t
:demand
:diminish
:bind (("C-c w u" . winner-undo)
("C-c w r" . winner-redo))
:config
@ -43,8 +39,6 @@
* ediff
#+begin_src emacs-lisp :tangle yes
(use-package ediff
:ensure t
:diminish
:bind (("C-c d f" . ediff-files)
("C-c d b" . ediff-buffers)
("C-c d 3 f" . ediff-files3)

View file

@ -7,7 +7,6 @@
#+begin_src emacs-lisp :tangle yes
(use-package doc-view
:defer t
:ensure t
:bind ( :map doc-view-mode-map
("<mouse-8>" . doc-view-previous-page)
("<mouse-9>" . doc-view-next-page))
@ -21,8 +20,6 @@
* Markdown
#+begin_src emacs-lisp
(use-package markdown-mode
:ensure t
:diminish
:custom
(markdown-enable-math t)
(markdown-enable-html t)
@ -36,8 +33,6 @@
* Pandoc
#+begin_src emacs-lisp
(use-package pandoc-mode
:ensure t
:diminish
:after (markdown-mode)
:hook (markdown-mode . conditionally-turn-on-pandoc))
#+end_src