-
Notifications
You must be signed in to change notification settings - Fork 19
/
init.el
182 lines (171 loc) · 5.76 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
171
172
173
174
175
176
177
178
179
180
181
182
;; * Modules
(defvar NOT-TERMUX (not (string-match-p ".*Android*"
(shell-command-to-string
"uname -a")))
"Not inside TERMUX.app")
(defvar IS-WSL (string-match-p "Linux.*microsoft.*Linux"
(shell-command-to-string
"uname -a"))
"Inside WSL")
(doom! :completion
(:if NOT-TERMUX
(company +childframe)
company)
ivy
:ui
(:if NOT-TERMUX
(popup +defaults))
vc-gutter
doom
doom-dashboard
hl-todo
(modeline +light)
ophints
workspaces
zen
:editor
(evil +everywhere)
file-templates
fold
(format +onsave)
lispy
multiple-cursors
rotate-text
snippets
word-wrap
:emacs
dired
dired-plugins
electric
vc
:term
(:if NOT-TERMUX vterm)
:checkers
(:if NOT-TERMUX syntax)
spell
:tools
(:if NOT-TERMUX lsp)
;; docker
(:if NOT-TERMUX pdf)
;; reference
(pass +auth)
editorconfig
(eval +overlay)
(lookup +docsets)
(magit +forge)
:lang
;; data
(python +lsp +pyright)
(:if NOT-TERMUX (latex +latexmk))
(ess +lsp)
(org
; +dragndrop
; +jupyter
; +pandoc
; +brain
+pretty
; +pomodoro
; +present
)
org-private
emacs-lisp
markdown
sh
:os
(:if IS-MAC macos)
tty
:app
(:if NOT-TERMUX rss)
;(:if NOT-TERMUX sx)
:config
(default +bindings))
;; * Config
(setq +file-templates-dir "~/.doom.d/templates"
max-specpdl-size 10000
evil-escape-key-sequence nil
user-full-name "Xi Fu"
org-roam-directory "~/org/"
user-mail-address "[email protected]")
(add-to-list 'initial-frame-alist '(fullscreen . maximized))
(add-to-list 'default-frame-alist '(fullscreen . maximized))
;; * UI
(setq browse-url-browser-function 'browse-url-default-browser
display-line-numbers-type nil
doom-big-font (font-spec :family "SF Mono" :size 16)
doom-font (font-spec :family "SF Mono" :size 12)
doom-theme 'doom-dracula
doom-unicode-font (font-spec :family "Sarasa Mono SC" :size 12)
doom-variable-pitch-font (font-spec :family "SF Compact Display" :size 12)
frame-alpha-lower-limit 0
frame-title-format
'("emacs%@"
(:eval (system-name)) ": "
(:eval (if (buffer-file-name)
(abbreviate-file-name (buffer-file-name)) "%b")))
indicate-buffer-boundaries nil
indicate-empty-lines nil
org-bullets-bullet-list '("◉")
pdf-view-use-unicode-ligther nil
which-key-idle-delay 0.3)
(when (display-graphic-p)
(or standard-display-table
(setq standard-display-table (make-display-table)))
(set-display-table-slot standard-display-table 0 ?\ )
(setq-default fringe-indicator-alist
(delq (assq 'truncation fringe-indicator-alist)
(delq (assq 'continuation fringe-indicator-alist)
fringe-indicator-alist))))
;; * Keys
(setq +default-repeat-backward-key "'"
+default-repeat-forward-key ";"
+evil-collection-disabled-list '(anaconda-mode
buff-menu
comint
company
custom
eldoc
elisp-mode
ert
free-keys
help
helm
image
kotlin-mode
occur
package-menu
ruby-mode
simple
slime
lispy
elfeed
;; outline
notmuch)
doom-localleader-key ","
evil-collection-company-use-tng nil
evil-respect-visual-line-mode t
evil-shift-width 2
evil-snipe-override-evil-repeat-keys nil
evil-want-C-u-scroll t
evil-want-integration t)
;; * Repo
;; (setq package-archives '(("gnu" . "http://elpa.emacs-china.org/gnu/")
;; ("org" . "http://elpa.emacs-china.org/org/")
;; ("melpa" . "http://elpa.emacs-china.org/melpa/")))
;; * Termux-specific
(when (not NOT-TERMUX)
(setq browse-url-browser-function 'browse-url-xdg-open))
;; * Mac-specific
(when IS-MAC
(setq insert-directory-program "gls")
(setq ns-use-thin-smoothing t)
(add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
(add-to-list 'default-frame-alist '(ns-appearance . dark))
(setenv "PKG_CONFIG_PATH" (concat (shell-command-to-string "printf %s \"$(brew --prefix libffi)\"") "/lib/pkgconfig/"))
)
;; * Arch-specific
(when IS-LINUX
(setq insert-directory-program "ls"
doom-big-font (font-spec :family "SF Mono" :size 18)
doom-font (font-spec :family "SF Mono" :size 16)
doom-unicode-font (font-spec :family "Sarasa Mono SC" :size 16)
doom-variable-pitch-font (font-spec :family "New York" :size 20)))