summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el174
1 files changed, 170 insertions, 4 deletions
diff --git a/init.el b/init.el index 843fae9..3cbf3cc 100644 --- a/init.el +++ b/init.el
@@ -25,7 +25,7 @@
25 "M-/" #'hippie-expand 25 "M-/" #'hippie-expand
26 "M-=" #'count-words 26 "M-=" #'count-words
27 "C-x C-b" #'ibuffer 27 "C-x C-b" #'ibuffer
28"C-x 4 n" #'clone-buffer 28 "C-x 4 n" #'clone-buffer
29 "S-<down-mouse-1>" #'mouse-set-mark 29 "S-<down-mouse-1>" #'mouse-set-mark
30 "C-x 0" #'+delete-window-or-bury-buffer 30 "C-x 0" #'+delete-window-or-bury-buffer
31 "M-j" nil 31 "M-j" nil
@@ -42,7 +42,9 @@
42 (let ((buffer-quit-function #'ignore)) 42 (let ((buffer-quit-function #'ignore))
43 (apply fn r))) 43 (apply fn r)))
44 ;; Themes 44 ;; Themes
45 (load-theme 'modus-operandi)) 45 (load-theme 'modus-operandi)
46 (set-face-attribute 'default nil :family "Comic Code" :height 100)
47 (set-face-attribute 'variable-pitch nil :family "Comic Code" :height 100))
46 48
47(yoke isearch nil 49(yoke isearch nil
48 (define-keys (current-global-map) 50 (define-keys (current-global-map)
@@ -64,7 +66,7 @@
64 tab-always-indent 'complete 66 tab-always-indent 'complete
65 completion-in-region-function #'consult-completion-in-region 67 completion-in-region-function #'consult-completion-in-region
66 consult-narrow-key "<" 68 consult-narrow-key "<"
67 consult--regexp-compiler #'consult--orderless-regexp-compiler) 69 consult--regexp-compiler #'consult--default-regexp-compiler)
68 (advice-add #'register-preview :override #'consult-register-window) 70 (advice-add #'register-preview :override #'consult-register-window)
69 (define-keys (current-global-map) 71 (define-keys (current-global-map)
70 ;; C-c bindings (mode-specific-map) 72 ;; C-c bindings (mode-specific-map)
@@ -118,7 +120,7 @@
118 (define-key org-mode-map (kbd "M-g o") #'consult-org-heading))) 120 (define-key org-mode-map (kbd "M-g o") #'consult-org-heading)))
119 121
120(yoke orderless "https://github.com/oantolin/orderless" 122(yoke orderless "https://github.com/oantolin/orderless"
121(require 'orderless) 123 (require 'orderless)
122 (setq completion-styles '(substring orderless basic) 124 (setq completion-styles '(substring orderless basic)
123 completion-category-defaults nil 125 completion-category-defaults nil
124 completion-category-overrides '((file (styles basic partial-completion))) 126 completion-category-overrides '((file (styles basic partial-completion)))
@@ -205,3 +207,167 @@
205 (locate-user-emacs-file "yoke/with-editor/lisp"))) 207 (locate-user-emacs-file "yoke/with-editor/lisp")))
206 (autoload #'transient--with-suspended-override "transient") 208 (autoload #'transient--with-suspended-override "transient")
207 (autoload #'magit "magit" nil :interactive)) 209 (autoload #'magit "magit" nil :interactive))
210
211(yoke visual-fill-column "https://codeberg.org/joostkremers/visual-fill-column"
212 (setq visual-fill-column-center-text t)
213 (add-hook* 'visual-fill-column-mode-hook #'visual-line-mode)
214 (advice-add 'text-scale-adjust :after #'visual-fill-column-adjust))
215
216(yoke org "https://git.savannah.gnu.org/git/emacs/org-mode.git"
217 :load (locate-user-emacs-file "yoke/org/lisp/")
218 :depends ((org-contrib "https://git.sr.ht/~bzg/org-contrib"
219 (locate-user-emacs-file "yoke/org-contrib/lisp")))
220 ;; DON'T load system org
221 (setq load-path
222 (cl-remove-if (lambda (path) (string-match-p "lisp/org\\'" path)) load-path))
223 (setq org-adapt-indentation nil
224 org-auto-align-tags t
225 org-archive-mark-done t
226 org-fold-catch-invisible-edits 'show-and-error
227 org-clock-clocked-in-display 'mode-line
228 org-clock-frame-title-format (cons
229 '(t org-mode-line-string)
230 (cons " --- " frame-title-format))
231 org-clock-string-limit 7 ; just the clock bit
232 ;; org-clock-string-limit 25 ; gives enough information
233 org-clock-persist nil
234 org-confirm-babel-evaluate nil
235 org-cycle-separator-lines 0
236 org-directory (sync/ "org/" t)
237 org-ellipsis (or truncate-string-ellipsis "…")
238 org-fontify-done-headline t
239 org-fontify-quote-and-verse-blocks t
240 org-fontify-whole-heading-line t
241 org-hide-emphasis-markers t
242 org-html-coding-system 'utf-8-unix
243 org-image-actual-width (list (* (window-font-width)
244 (- fill-column 8)))
245 org-imenu-depth 3
246 org-indent-indentation-per-level 0
247 org-indent-mode-turns-on-hiding-stars nil
248 org-insert-heading-respect-content t
249 org-list-demote-modify-bullet '(("-" . "+")
250 ("+" . "-"))
251 org-log-done 'time
252 org-log-into-drawer t
253 org-num-skip-commented t
254 org-num-skip-unnumbered t
255 org-num-skip-footnotes t
256 org-outline-path-complete-in-steps nil
257 org-pretty-entities t
258 org-pretty-entities-include-sub-superscripts nil
259 org-refile-targets '((nil . (:maxlevel . 2))
260 (org-agenda-files . (:maxlevel . 1)))
261 org-refile-use-outline-path 'file
262 org-special-ctrl-a/e t
263 org-special-ctrl-k t
264 org-src-fontify-natively t
265 org-src-tab-acts-natively t
266 org-src-window-setup 'current-window
267 org-startup-truncated nil
268 org-startup-with-inline-images t
269 org-tags-column -77 ;; (- (- fill-column 1 (length org-ellipsis)))
270 org-todo-keywords
271 '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)"
272 "|" "DONE(d!)" "ASSIGNED(a@/!)")
273 (sequence "|" "CANCELED(k@)")
274 (sequence "MEETING(m)"))
275 org-use-speed-commands t
276 org-emphasis-alist '(("*" org-bold)
277 ("/" org-italic)
278 ("_" org-underline)
279 ("=" org-verbatim)
280 ("~" org-code)
281 ("+" org-strikethrough)))
282 ;; (setq org-todo-keywords
283 ;; '((sequence
284 ;; "TODO(t)"
285 ;; "NEXT(n!)" ; next action
286 ;; "DONE(d)" ; done)
287 ;; (sequence
288 ;; "WAIT(w@)" ; waiting to be actionable again
289 ;; "HOLD(h@/!)" ; actinable, but will do later
290 ;; "IDEA(i)" ; maybe someday
291 ;; "KILL(k@/!)" ; cancelled, aborted or is no longer applicable
292 ;; ))))))
293 (add-hook* 'org-mode-hook
294 #'variable-pitch-mode
295 #'visual-fill-column-mode
296 #'turn-off-auto-fill
297 #'org-indent-mode
298 #'prettify-symbols-mode
299 #'abbrev-mode)
300 (eval-after org
301 (require '+org)
302 (define-keys org-mode-map
303 "C-M-k" #'kill-paragraph
304 "C-M-t" #'transpose-paragraphs)
305 (org-clock-persistence-insinuate)))
306
307(yoke org-agenda nil
308 (setq org-agenda-skip-deadline-if-done t
309 org-agenda-skip-scheduled-if-done t
310 org-agenda-span 10
311 org-agenda-block-separator ?─
312 org-agenda-time-grid
313 '((daily today require-timed)
314 (800 1000 1200 1400 1600 1800 2000)
315 " ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
316 org-agenda-current-time-string
317 "← now ─────────────────────────────────────────────────"
318 org-agenda-include-diary nil ; I use the org-diary features
319 org-agenda-todo-ignore-deadlines 'near
320 org-agenda-todo-ignore-scheduled 'future
321 org-agenda-include-deadlines t
322 org-deadline-warning-days 0
323 org-agenda-show-future-repeats 'next
324 org-agenda-window-setup 'current-window)
325 (setq-local-hook org-agenda-mode-hook
326 truncate-lines t)
327 (add-hook 'org-agenda-after-show-hook #'org-narrow-to-subtree))
328
329(yoke ox nil ; org-export
330 (eval-after org (require 'ox))
331 (eval-after ox
332 (require '+ox)
333 (require 'ox-md nil :noerror)
334 (+org-export-pre-hooks-insinuate))
335 (setq org-export-coding-system 'utf-8-unix
336 org-export-headline-levels 8
337 org-export-with-drawers nil
338 org-export-with-section-numbers nil
339 org-export-with-smart-quotes t
340 org-export-with-sub-superscripts t
341 org-export-with-toc nil))
342
343(yoke _work (sync/ "emacs/private")
344 :depends ((+org-capture (locate-user-emacs-file "lisp"))
345 (private (locate-user-emacs-file "lisp"))
346 (bbdb "https://git.savannah.nongnu.org/git/bbdb.git"
347 (locate-user-emacs-file "yoke/bbdb/lisp"))
348 (bbdb-vcard "https://github.com/tohojo/bbdb-vcard/"))
349 (require 'bbdb)
350 (require 'private)
351 (require '_work)
352 (bbdb-initialize 'gnus 'message)
353 (setq bbdb-complete-mail-allow-cycling t))
354
355(yoke org-taskwise "https://codeberg.org/acdw/org-taskwise.el")
356
357(yoke titlecase "https://codeberg.org/acdw/titlecase.el"
358 (eval-after org (require 'titlecase))
359 (eval-after titlecase
360 (require '+titlecase)
361 (add-to-list* 'titlecase-skip-words-regexps (rx word-boundary
362 (+ (any upper digit))
363 word-boundary))))
364
365(yoke flyspell-correct "https://github.com/duckwork/flyspell-correct"
366 (eval-after flyspell
367 (require 'flyspell-correct)
368 (require '+flyspell-correct)
369 (define-keys flyspell-mode-map
370 "C-;" #'flyspell-correct-wrapper
371 "<f7>" #'+flyspell-correct-buffer))
372 (add-hook 'org-mode-hook #'flyspell-mode)
373 (setq flyspell-correct--cr-key ";"))