diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 135 |
1 files changed, 39 insertions, 96 deletions
diff --git a/init.el b/init.el index 3fcf374..0ef669f 100644 --- a/init.el +++ b/init.el | |||
@@ -4,24 +4,23 @@ | |||
4 | 4 | ||
5 | ;;; Code: | 5 | ;;; Code: |
6 | 6 | ||
7 | ;;; Remove when done bankrupting | ||
8 | |||
9 | (defkeys t "C-x C-c" #'restart-emacs) | ||
10 | |||
11 | ;;; My extras | 7 | ;;; My extras |
12 | 8 | ||
13 | (push (expand-file-name (locate-user-emacs-file "lisp")) load-path) | 9 | (push (expand-file-name (locate-user-emacs-file "lisp")) load-path) |
14 | (require 'acdw) ; Omnibus fun stuff | 10 | (require 'acdw) ; Omnibus fun stuff |
15 | 11 | ||
12 | ;;; Remove when done bankrupting | ||
13 | |||
14 | (defkeys t "C-x C-c" #'restart-emacs) | ||
15 | |||
16 | ;;; Basic defaults | 16 | ;;; Basic defaults |
17 | 17 | ||
18 | (use-package no-littering | 18 | (use-package no-littering |
19 | :ensure t | 19 | :ensure t :demand t |
20 | :demand t | 20 | :preface |
21 | (setq no-littering-etc-directory etc/ | ||
22 | no-littering-var-directory var/) | ||
21 | :custom | 23 | :custom |
22 | (no-littering-etc-directory etc/) | ||
23 | (no-littering-var-directory var/) | ||
24 | (custom-file (etc/ "custom.el")) | ||
25 | (auto-save-file-name-transforms `(("." ,(var/ "auto-save/") t))) | 24 | (auto-save-file-name-transforms `(("." ,(var/ "auto-save/") t))) |
26 | (auto-save-list-file-prefix (var/ "auto-save/.saves-" t)) | 25 | (auto-save-list-file-prefix (var/ "auto-save/.saves-" t)) |
27 | (backup-directory-alist `(("." . ,(var/ "backup/" t))))) | 26 | (backup-directory-alist `(("." . ,(var/ "backup/" t))))) |
@@ -82,30 +81,28 @@ | |||
82 | ;;; Completions | 81 | ;;; Completions |
83 | 82 | ||
84 | (use-package vertico | 83 | (use-package vertico |
85 | :ensure t | 84 | :ensure t :demand t |
86 | :custom | 85 | :custom |
87 | (resize-mini-windows 'grow-only) | 86 | (resize-mini-windows 'grow-only) |
88 | (vertico-cycle t) | 87 | (vertico-cycle t) |
89 | :init | 88 | :config |
90 | (use-package vertico-directory | 89 | (use-package vertico-directory |
91 | :after vertico | 90 | :after vertico |
92 | :config | 91 | :hook (rfn-eshadow-update-overlay-hook . vertico-directory-tidy)) |
93 | (add-hook 'rfn-eshadow-update-overlay-hook #'vertico-directory-tidy)) | ||
94 | (vertico-mode)) | 92 | (vertico-mode)) |
95 | 93 | ||
96 | (use-package marginalia | 94 | (use-package marginalia |
97 | :ensure t | 95 | :ensure t :demand t |
98 | :demand t | ||
99 | :config | 96 | :config |
100 | (add-hook 'minibuffer-setup-hook #'truncate-lines-local-mode) | 97 | (add-hook 'minibuffer-setup-hook #'truncate-lines-local-mode) |
101 | (marginalia-mode)) | 98 | (marginalia-mode)) |
102 | 99 | ||
103 | (use-package orderless | 100 | (use-package orderless |
104 | :ensure t | 101 | :ensure t :demand t |
105 | :custom | 102 | :config |
106 | (completion-styles '(orderless basic)) | 103 | (setc completion-styles '(orderless basic) |
107 | (completion-category-overrides | 104 | completion-category-overrides |
108 | '((file (styles basic partial-completion))))) | 105 | '((file (styles basic partial-completion))))) |
109 | 106 | ||
110 | (use-package consult | 107 | (use-package consult |
111 | :ensure t | 108 | :ensure t |
@@ -158,7 +155,7 @@ | |||
158 | (window-parameters (mode-line-format . none))))) | 155 | (window-parameters (mode-line-format . none))))) |
159 | 156 | ||
160 | (use-package embark-consult | 157 | (use-package embark-consult |
161 | :ensure t | 158 | :ensure t :demand t |
162 | :after (embark consult) | 159 | :after (embark consult) |
163 | :hook (embark-collect-mode-hook . consult-preview-at-point-mode)) | 160 | :hook (embark-collect-mode-hook . consult-preview-at-point-mode)) |
164 | 161 | ||
@@ -217,8 +214,7 @@ | |||
217 | (advice-add 'text-scale-adjust :after #'visual-fill-column-adjust)) | 214 | (advice-add 'text-scale-adjust :after #'visual-fill-column-adjust)) |
218 | 215 | ||
219 | (use-package cape | 216 | (use-package cape |
220 | :ensure t | 217 | :ensure t :demand t |
221 | :demand t | ||
222 | :init | 218 | :init |
223 | (dolist (fn '(cape-file cape-dabbrev)) | 219 | (dolist (fn '(cape-file cape-dabbrev)) |
224 | (add-hook 'completion-at-point-functions fn 90)) | 220 | (add-hook 'completion-at-point-functions fn 90)) |
@@ -235,79 +231,27 @@ | |||
235 | :bind (:map grep-mode-map | 231 | :bind (:map grep-mode-map |
236 | ("C-x C-q" . wgrep-change-to-wgrep-mode))) | 232 | ("C-x C-q" . wgrep-change-to-wgrep-mode))) |
237 | 233 | ||
238 | (progn | 234 | (use-package mlscroll |
239 | (use-package-statistics-gather :use-package 'mlscroll nil) | 235 | :ensure t :defer 1 |
240 | (use-package-ensure-elpa 'mlscroll | 236 | :preface |
241 | '(t) | 237 | (defhook modus-themes-after-load-theme-hook |
242 | 'nil) | 238 | :name modus-themes-load@mlscroll |
243 | (use-package-statistics-gather :preface 'mlscroll nil) | 239 | (mlscroll-mode -1) |
244 | (eval-and-compile | 240 | (when |
245 | (defhook modus-themes-after-load-theme-hook :name modus-themes-load@mlscroll | 241 | (or |
246 | (mlscroll-mode -1) | 242 | (memq 'modus-vivendi custom-enabled-themes) |
247 | (when | 243 | (memq 'modus-operandi custom-enabled-themes)) |
248 | (or | 244 | (modus-themes-with-colors |
249 | (memq 'modus-vivendi custom-enabled-themes) | 245 | (setf mlscroll-in-color fg-dim mlscroll-out-color bg-inactive))) |
250 | (memq 'modus-operandi custom-enabled-themes)) | 246 | (eval-after 1 |
251 | (modus-themes-with-colors | 247 | (mlscroll-mode 1))) |
252 | (setf mlscroll-in-color fg-dim mlscroll-out-color bg-inactive))) | 248 | :init |
253 | (eval-after 1 | 249 | (when (daemonp) |
254 | (mlscroll-mode 1)))) | 250 | (add-hook 'server-after-make-frame #'modus-themes-load@mlscroll)) |
255 | (defvar use-package--warning99 | 251 | :config (modus-themes-load@mlscroll)) |
256 | (function | ||
257 | (lambda | ||
258 | (keyword err) | ||
259 | (let | ||
260 | ((msg | ||
261 | (format "%s/%s: %s" 'mlscroll keyword | ||
262 | (error-message-string err)))) | ||
263 | (display-warning 'use-package msg :error))))) | ||
264 | (condition-case-unless-debug err | ||
265 | (progn | ||
266 | (use-package-statistics-gather :init 'mlscroll nil) | ||
267 | (condition-case-unless-debug err | ||
268 | (when | ||
269 | (daemonp) | ||
270 | (add-hook 'server-after-make-frame | ||
271 | (function modus-themes-load@ml-scroll))) | ||
272 | (error | ||
273 | (funcall use-package--warning99 :init err))) | ||
274 | (run-with-idle-timer 1 nil | ||
275 | (function require) | ||
276 | 'mlscroll nil t) | ||
277 | (eval-after-load 'mlscroll | ||
278 | '(progn | ||
279 | (use-package-statistics-gather :config 'mlscroll nil) | ||
280 | (let | ||
281 | ((now | ||
282 | (current-time))) | ||
283 | (message "%s..." "Configuring package mlscroll") | ||
284 | (prog1 | ||
285 | (condition-case-unless-debug err | ||
286 | (progn | ||
287 | (modus-themes-load@mlscroll) | ||
288 | t) | ||
289 | (error | ||
290 | (funcall use-package--warning99 :config err))) | ||
291 | (let | ||
292 | ((elapsed | ||
293 | (float-time | ||
294 | (time-subtract | ||
295 | (current-time) | ||
296 | now)))) | ||
297 | (if | ||
298 | (> elapsed 0.1) | ||
299 | (message "%s...done (%.3fs)" "Configuring package mlscroll" elapsed) | ||
300 | (message "%s...done" "Configuring package mlscroll"))))) | ||
301 | (use-package-statistics-gather :config 'mlscroll t))) | ||
302 | (use-package-statistics-gather :init 'mlscroll t)) | ||
303 | (error | ||
304 | (funcall use-package--warning99 :catch err))) | ||
305 | (use-package-statistics-gather :preface 'mlscroll t) | ||
306 | (use-package-statistics-gather :use-package 'mlscroll t)) | ||
307 | 252 | ||
308 | (use-package avy | 253 | (use-package avy |
309 | :ensure t | 254 | :ensure t :demand t |
310 | :demand t | ||
311 | :custom | 255 | :custom |
312 | (avy-background t) | 256 | (avy-background t) |
313 | (avy-keys (string-to-list "asdfghjklqwertyuiopzxcvbnm")) | 257 | (avy-keys (string-to-list "asdfghjklqwertyuiopzxcvbnm")) |
@@ -762,8 +706,7 @@ | |||
762 | ;;; The INTERNET | 706 | ;;; The INTERNET |
763 | 707 | ||
764 | (use-package link-hint | 708 | (use-package link-hint |
765 | :ensure t | 709 | :ensure t :demand t |
766 | :demand t | ||
767 | :preface | 710 | :preface |
768 | (global-set-key (kbd "M-l") nil) | 711 | (global-set-key (kbd "M-l") nil) |
769 | :custom | 712 | :custom |