summaryrefslogtreecommitdiff
path: root/lisp/quality-of-life.el
blob: bd4d66a2beab4835e7684943e54dc15a4621ec92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
;;; quality-of-life.el -*- lexical-binding: t; -*-
;;;
;;; Author:  Jakob L. Kreuze <zerodaysfordays@sdf.org>
;;; URL:     https://git.sr.ht/~jakob/.emacs.d/
;;;
;;; Configuration for packages which I consider to be functional improvements to
;;; the quality of my daily Emacs usage.
;;;


;;;
;;; Ivy
;;;

;; As suggested by a friend [1], I tried out `ivy' as a replacement for `ido.'
;; It was love at first sight. It's snappy, and works even better than `ido'
;; after setting `exwm-workspace-show-all-buffers' and
;; `exwm-layout-show-all-buffers'.
;;
;; [1]: https://icosahedron.website/@zge/101330910258980695

(use-package ivy
  ;; Configure how the =completing-read= is displayed.
  :init
  (setq ivy-height 5 ivy-count-format "")

  ;; Enable Ivy globally.
  :config
  (ivy-mode 1)

  ;; If I'm typing a file name with capitalized letters, I may be holding shift
  ;; when I press space. This is a pain in the ass, and I don't use the feature
  ;; anyway, so I unbind it.
  (bind-key "S-SPC" nil ivy-minibuffer-map))

;; `counsel' is a nice Ivy-based frontend for a couple of interactive commands.

(use-package counsel
  :demand t
  :bind
  ("C-x b" . counsel-switch-buffer))

;; Use Swiper instead of isearch.

;; TODO: Should I re-enable this?

;; (use-package swiper
;;   :bind
;;   ("C-r" . swiper)
;;   ("C-s" . swiper))

;; Use a better sorting algorithm.

(use-package ivy-prescient
  :config
  (ivy-prescient-mode)
  (prescient-persist-mode)
  :init
  (setq prescient-save-file "~/.cache/prescient-save.el"))


;;;
;;; Imenu
;;;

(use-package imenu
  :bind ("C-c s" . imenu))


;;;
;;; Yasnippet
;;;

;; Load all snippets when `yas-minor-mode' is enabled.

(use-package yasnippet
  :demand t
  :hook
  (yas-minor-mode . yas-reload-all))


;;;
;;; Avy
;;;

;; Set up keybindings for Avy.

(use-package avy
  :bind
  ("M-s" . avy-goto-char-timer)
  :init
  (setq avy-timeout-seconds 0.2))

;; Install a link-selection package for Avy, and create a binding for `org-mode'.

;; TODO: Should I re-enable this?

;; (use-package ace-link
;;   :after org
;;   :init (ace-link-setup-default)
;;   :bind (:map org-mode-map
;;          ("C-c C-o" . ace-link-org)))

© 2015 - 2026 Jakob L. Kreuze