-
Notifications
You must be signed in to change notification settings - Fork 4
/
init.el
170 lines (143 loc) · 4.9 KB
/
init.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
;;; init.el -*- lexical-binding: t; -*-
;; I added these to help with debugging my config. It's easier to toggle these
;; than to comment out large sections of my config.
(let ((q t))
(defvar cae-init-preamble-enabled-p (and q t))
(defvar cae-init-core-enabled-p (and q t))
(defvar cae-keyboard-remaps-enabled-p (and q t))
(let ((p (and q t)))
(defvar cae-init-ui-enabled-p (and p t))
(defvar cae-init-tools-enabled-p (and p t))
(defvar cae-init-editor-enabled-p (and p t))
(defvar cae-init-autocompletion-enabled-p (and p t))
(defvar cae-init-text-enabled-p (and p t))
(defvar cae-init-email-enabled-p (and p t))
(defvar cae-init-term-enabled-p (and p t))
(defvar cae-init-languages-enabled-p (and p t))))
(when cae-init-preamble-enabled-p
(when (string-equal system-type "android") ;; Add Termux binaries to PATH environment
(let ((termuxpath "/data/data/com.termux/files/usr/bin"))
(setenv "PATH" (concat (getenv "PATH") ":" termuxpath))
(setq exec-path (append exec-path (list termuxpath)))))
;; This is so that I don't accidentally start Emacs as a daemon.
(when (daemonp) (kill-emacs))
(when (boundp 'safe-local-variable-directories)
(add-to-list 'safe-local-variable-directories doom-user-dir)
(add-to-list 'safe-local-variable-directories doom-emacs-dir)
(add-to-list 'safe-local-variable-directories "~/org")
(add-to-list 'safe-local-variable-directories (getenv "HOME")))
(when (and (>= (num-processors) 32)
(not (eq system-type 'windows-nt))
(> (car (memory-info))
(* 180 1024 1024)))
(let ((cae-gc-cons-threshold (* 128 1024 1024 1024)))
(setq gcmh-high-cons-threshold cae-gc-cons-threshold
consult--gc-threshold cae-gc-cons-threshold
cae-hacks-gc-cons-threshold cae-gc-cons-threshold
+lsp--default-gcmh-high-cons-threshold cae-gc-cons-threshold)))
(setq doom-incremental-idle-timer 0.25)
(setq native-comp-async-jobs-number (num-processors)
native-comp-async-report-warnings-errors 'silent)
(load! "lisp/cae-debug")
(load! "lisp/cae-hacks")
;; Load secrets
(defvar cae-multi-secrets-dir (expand-file-name "secrets/" doom-user-dir))
(make-directory cae-multi-secrets-dir t)
(when (file-exists-p (concat cae-multi-secrets-dir "secrets.el"))
(load! (concat cae-multi-secrets-dir "secrets.el")))
;; Set a fallback theme.
(setq doom-theme 'wheatgrass)
(setq evil-undo-system 'undo-fu)
;; Make it easier to debug lazy loading issues.
(when init-file-debug (setq doom-incremental-first-idle-timer nil))
;; I never want to see loading messages.
(unless init-file-debug
(defadvice! cae-load-ignore-message-a (args) :filter-args #'load
(cl-destructuring-bind (file &optional noerror nomessage nosuffix must-suffix) args
(list file noerror t nosuffix must-suffix))))
(setq doom-leader-alt-key "<menu>"
doom-localleader-alt-key "<menu> m"))
(doom! :completion
(vertico +icons +childframe)
(corfu +orderless +icons +dabbrev)
:ui
hl-todo
(hydra +childframe)
(popup +defaults)
(vc-gutter +pretty +diff-hl)
vi-tilde-fringe
workspaces
(window-select +numbers)
ophints
(treemacs +lsp)
:editor
file-templates
fold
(format +lsp)
snippets
multiple-cursors
(evil +everywhere)
:emacs
undo
ibuffer
vc
(dired +icons +dirvish)
:term
eshell
(:if (not (memq system-type '(cygwin windows-nt ms-dos))) vterm)
:checkers
(syntax +childframe +icons)
:tools
(debugger +lsp)
direnv
;;editorconfig ;; Now built into Emacs.
(eval +overlay)
(lookup +dictionary +docsets +offline)
(magit +forge)
(lsp +peek)
tree-sitter
(docker +lsp)
pdf
biblio
:lang
(emacs-lisp +tree-sitter)
(org +roam2 +tree-sitter +dragndrop +journal)
(cc +lsp +tree-sitter)
(web +lsp +tree-sitter)
(sh +lsp +tree-sitter)
(nix +lsp +tree-sitter)
(lua +lsp +tree-sitter +fennel)
(data +lsp +tree-sitter)
(latex +lsp +tree-sitter +cdlatex +latexmk +fold)
(json +lsp +tree-sitter)
(python +lsp +tree-sitter +pyright +cython)
(haskell +lsp +tree-sitter)
:os
(:if IS-MAC macos)
(:if (not (memq system-type '(cygwin windows-nt ms-dos))) tty +osc)
:config
(default +bindings +smartparens)
:email
;;mu4e
:app
(rss +org)
:cae
(lean4 +lsp +tree-sitter)
(helm +childframe)
debugger
eshell
exwm
dired
lisp
misc-applications
modeline
unpackaged
vc
org
(ai +openai)
gnus
rss
denote)
;;Local Variables:
;;eval: (when (featurep 'lispy) (lispy-mode -1))
;;End: