-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.el
291 lines (240 loc) · 5.95 KB
/
default.el
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
;;; -*- lexical-binding: t -*-
(use-package benchmark-init
:ensure t
:config
(add-hook 'after-init-hook 'benchmark-init/deactivate))
(require 'bind-key)
(use-package frame
:init
(scroll-bar-mode -1)
(tool-bar-mode -1)
(menu-bar-mode -1))
(use-package faces
:init
(defun jk/set-face-font (face family)
(set-face-attribute
face nil
:family family :weight 'regular :width 'expanded :height 150))
(jk/set-face-font 'default "Iosevka")
(jk/set-face-font 'fixed-pitch "Iosevka")
(jk/set-face-font 'variable-pitch "Iosevka Aile")
:custom
(face-font-family-alternatives
'(("Iosevka" "SF Mono" "Menlo" "monospace")
("Iosevka Aile" "SF Pro" "Helvetica" "Arial")))
:hook
(org-mode . variable-pitch-mode)
(markdown-mode . variable-pitch-mode))
(use-package auto-dark
:ensure t
:config
(auto-dark-mode 1)
:custom
(auto-dark-light-theme 'modus-operandi-tinted)
(auto-dark-dark-theme 'modus-vivendi-tinted))
(defun jk/dark ()
"Switch to macOS' dark appearance."
(interactive)
(do-applescript
"tell application \"System Events\"
tell appearance preferences
set dark mode to true
end tell
end tell"))
(defun jk/light ()
"Switch to macOS' light appearance."
(interactive)
(do-applescript
"tell application \"System Events\"
tell appearance preferences
set dark mode to false
end tell
end tell"))
(use-package emacs
:config
(require-theme 'modus-themes)
(setq
modus-themes-mixed-fonts t
modus-themes-italic-constructs t
modus-themes-bold-constructs t)
(load-theme 'modus-operandi-tinted)
:custom
modus-themes-to-toggle '(modus-operandi-tinted modus-vivendi-tinted))
(use-package spacious-padding
:ensure t
:init
(spacious-padding-mode 1)
:custom
spacious-padding-subtle-mode-line t)
(use-package evil
:ensure t
:hook
(prog-mode . turn-on-evil-mode)
(text-mode . turn-on-evil-mode))
(use-package evil-commentary
:ensure t
:after evil
:init
(evil-commentary-mode 1))
(use-package emacs
:init
(setq-default cursor-type 'bar))
(use-package vertico
:ensure t
:init
(vertico-mode 1))
(use-package marginalia
:ensure t
:init
(marginalia-mode 1))
(use-package consult
:ensure t
:bind
("C-x b" . consult-buffer)
("C-x p b" . consult-project-buffer)
("M-g g" . consult-goto-line)
("M-g M-g" . consult-goto-line)
("C-x p g" . consult-ripgrep))
(use-package orderless
:ensure t
:custom
completion-styles '(orderless basic))
(use-package embark
:ensure t
:bind
("C-." . embark-act))
(use-package savehist
:init
(savehist-mode 1))
(use-package completion-preview
:init
(global-completion-preview-mode 1))
(use-package treesit-auto
:ensure t
:config
(global-treesit-auto-mode 1)
:custom
(treesit-auto-install 'prompt))
(use-package beancount
:ensure t
:mode ("\\.beancount\\'" . beancount-mode))
(use-package dockerfile-mode
:ensure t)
(use-package elixir-mode
:ensure t)
(use-package git-modes
:ensure t)
(use-package markdown-mode
:ensure t
:mode ("\\.mdx\\'" . markdown-mode))
(use-package nix-mode
:ensure t)
(use-package rust-mode
:ensure t)
(use-package typescript-mode
:ensure t)
(use-package yaml-mode
:ensure t)
(use-package direnv
:ensure t
:init
(direnv-mode 1))
(defun jk/maybe-format-buffer ()
(when (bound-and-true-p eglot-managed-p)
(eglot-format-buffer)))
(use-package eglot
:config
(add-to-list 'eglot-server-programs '((rust-ts-mode rust-mode) "rust-analyzer"))
(add-to-list 'eglot-server-programs '((elixir-ts-mode elixir-mode) "elixir-ls"))
(add-to-list 'eglot-server-programs '((nix-mode) "nixd"))
:hook
(rust-mode . eglot-ensure)
(rust-ts-mode . eglot-ensure)
(nix-mode . eglot-ensure)
(after-save . jk/maybe-format-buffer))
(use-package magit
:ensure t)
(use-package eat
:ensure t
:init
(eat-eshell-mode 1)
:custom
eshell-visual-commands nil)
(use-package eshell-atuin
:after em-hist
:init
(eshell-atuin-mode)
(keymap-set eshell-hist-mode-map "<up>" 'eshell-atuin-history)
(keymap-unset eshell-hist-mode-map "<down>")
(vertico-multiform-mode 1)
(setq vertico-multiform-commands
'((eshell-atuin-history
reverse
(vertico-sort-function . identity))))
:custom
eshell-atuin-search-options nil)
(use-package dirvish
:ensure t
:init
(dirvish-override-dired-mode))
(use-package org-gode
:hook (org-mode . org-node-enable))
(use-package org-roam
:ensure t
:custom
org-roam-directory (file-truename "~/notes"))
(use-package org-roam-ui
:ensure t)
(use-package org-agenda
:custom
org-agenda-files '("/Users/jeff/Library/Mobile\ Documents/iCloud\~com\~appsonthemove\~beorg/Documents/org/inbox.org"))
(use-package ox-org
:custom
org-export-with-smart-quotes t
org-export-with-entities nil
org-export-headline-levels 5
org-export-with-toc nil
org-export-section-numbers nil
org-html-doctype "html5"
org-html-html5-fancy t
org-html-container-element "section"
org-html-divs '((preamble "header" "preamble")
(content "main" "content")
(postamble "footer" "postamble")))
(use-package org-babel
:custom
org-babel-load-languages '((emacs-lisp . t)
(shell . t)))
(use-package org-auto-tangle
:ensure t
:custom
org-auto-tangle-default t
:hook
(org-mode . org-auto-tangle-mode))
(use-package notmuch
:ensure t)
(use-package files
:custom
backup-directory-alist `(("." . "~/.emacs.d/backups")))
(use-package which-key
:ensure t
:init
(which-key-mode 1))
(use-package project-x
:after project
:init
(project-x-mode 1)
(setq project-find-functions '(project-x-try-local project-try-vc)))
(use-package pixel-scroll
:init
(pixel-scroll-precision-mode 1))
(use-package simple
:init
(indent-tabs-mode 0))
(write-region
(format "%s,%s\n"
(string-trim (shell-command-to-string "git --git-dir ~/emacs-config/.git rev-parse HEAD"))
(benchmark-init/node-duration-adjusted benchmark-init/durations-tree))
nil
"~/.emacs.d/benchmark.csv"
'append)