-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.el
309 lines (296 loc) · 10.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
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
;; -*- mode: emacs-lisp -*-
(defun dotspacemacs/layers ()
(setq-default
dotspacemacs-distribution 'spacemacs-base
dotspacemacs-enable-lazy-installation nil
dotspacemacs-ask-for-lazy-installation nil
dotspacemacs-configuration-layer-path '()
dotspacemacs-additional-packages '(toml-mode)
dotspacemacs-frozen-packages '()
dotspacemacs-excluded-packages
`(persp-mode
smooth-scrolling
spaceline
window-numbering
winum
org-bullets
tern
ess-smart-equals
wolfram-mode
vi-tilde-fringe
open-junk-file
neotree)
dotspacemacs-install-packages 'used-but-keep-unused
dotspacemacs-configuration-layers
`(;; NOTE: These layers are not loaded
;; - spacemacs-layouts (persp, eyebrowse)
;; NOTE: counsel-projectile is loaded by spacemacs-layouts
;; which should not have been
;; - spacemacs-modeline (spaceline)
;; MAYBE: enable spacemacs purpose
;; - spacemacs-purpose
spacemacs-completion
spacemacs-defaults
spacemacs-editing-visual
spacemacs-editing
spacemacs-evil
spacemacs-language
spacemacs-misc
spacemacs-navigation
spacemacs-org
spacemacs-project
;; spacemacs-purpose
spacemacs-visual
;; prog langs
emacs-lisp
;; ,(unless (spacemacs/system-is-mswindows)
;; 'lsp)
;; python
yxl-elpy
vimscript
yaml
windows-scripts
autohotkey
(c-c++ :variables
c-c++-default-mode-for-headers 'c++-mode)
sql
lua
clojure
scala
javascript
typescript
html
graphviz
csv
(shell :variables
shell-default-shell (if (eq window-system 'w32) 'eshell
'shell)
shell-default-height 60
shell-default-position 'bottom
shell-default-full-span t)
shell-scripts
;; note takings
(deft :variables deft-directory "~/Dropbox/org/notes")
(org :packages (not ox-reveal)
:variables
org-enable-reveal-js-support t)
;; markup langs
;; markdown: need vmd from npm: npm install -g vmd
(markdown :packages (not mmm-mode)
:variables markdown-live-preview-engine 'vmd)
(pandoc :packages (not ox-pandoc))
(latex :variables
latex-build-command "LatexMk"
latex-enable-auto-fill nil
latex-enable-folding t
;; Enable magic-latex-buffer
latex-enable-magic nil)
bibtex
;; editing
(vinegar :packages (not dired))
parinfer
;; major util modes
(spell-checking :variables
spell-checking-enable-by-default nil)
(syntax-checking :variables
syntax-checking-enable-by-default nil)
(helm :can-shadow nil)
(ivy :variables
;; ivy-rich is slow
ivy-enable-advanced-buffer-information t)
(auto-completion :variables
;; use tab to complete
;; return key enters new line
auto-completion-return-key-behavior 'complete
auto-completion-tab-key-behavior 'complete
auto-completion-enable-sort-by-usage nil
auto-completion-enable-help-tooltip 'manual
:disabled-for ; layer name
org
markdown)
(version-control :variables
version-control-diff-tool 'git-gutter)
git
,(unless (spacemacs/system-is-mswindows)
'github)
(treemacs :variables
treemacs-use-git-mode nil)
docker
;; minor utils modes
colors
(ibuffer :variables
;; dont set to projects, really freaking slow
ibuffer-group-buffers-by 'modes)
search-engine
better-defaults
imenu-list
;; fun
(twitter :variables
twittering-use-master-password t)
;; my private layers
;; +3rd-parties
calfw
ov-highlighter
;; +utils
yxl-base
,(unless (spacemacs/system-is-mswindows)
'yxl-git)
yxl-pdf-tools
yxl-utils
yxl-dired
yxl-general-config
(yxl-completion)
yxl-project
yxl-misc
;; +edit
yxl-edit
yxl-evil
;; ui
yxl-workspace
(yxl-ui :variables
yxl-ui-modeline
,(if (spacemacs/system-is-mswindows)
''yxl-airline ''doom-modeline))
;; +lang
yxl-prog
yxl-text
(yxl-ess :variables
yxl-ess-enable-lsp nil)
;; yxl-jupyter
(yxl-docs :variables
yxl-docs-docset-path "~/Dropbox/dash-docsets")
(yxl-org :variables
yxl-org-babel-languages '((dot . t)
(latex .t)
(python .t)
(shell .t)
(R .t)
(ipython . t)
(scala . t)))
;; +webservice
yxl-web
,(unless (spacemacs/system-is-mswindows)
`(yxl-email :packages
(not mu4e-alert)
:variables
mu4e-installation-path "/usr/local/share/emacs/site-lisp/mu4e"))
(yxl-elfeed :variables
elfeed-enable-web-interface t
yxl-elfeed-db-directory "~/Dropbox/rss/.elfeed"))))
(defun dotspacemacs/init ()
(setq-default
dotspacemacs-elpa-https t
dotspacemacs-elpa-timeout 5
dotspacemacs-gc-cons '(100000000 0.1)
dotspacemacs-use-spacelpa nil
dotspacemacs-verify-spacelpa-archives nil
dotspacemacs-check-for-update nil
dotspacemacs-elpa-subdirectory 'emacs-version
dotspacemacs-editing-style '(vim :variables
vim-style-visual-feedback nil
vim-style-remap-Y-to-y$ t
vim-style-retain-visual-state-on-shift t
vim-style-visual-line-move-text nil
vim-style-ex-substitute-global nil)
dotspacemacs-verbose-loading nil
dotspacemacs-startup-banner 0
dotspacemacs-startup-lists '((projects . 5)
(recents . 10))
dotspacemacs-startup-buffer-responsive t
dotspacemacs-scratch-mode 'fundamental-mode
dotspacemacs-initial-scratch-message nil
dotspacemacs-themes '((yxl-gruv-dark :location site)
(yxl-gruv-light :location site)
(yxl-solar-dark :location site)
sanityinc-tomorrow-night)
dotspacemacs-mode-line-theme '(spacemacs :separator wave :separator-scale 1.5)
dotspacemacs-colorize-cursor-according-to-state t
dotspacemacs-default-font `(,(cond ((eq system-type 'windows-nt)
"Sarasa Mono Sc")
((eq system-type 'darwin)
"hack")
(t "Sarasa Mono Sc"))
:size ,(cond ((eq system-type 'darwin) 12)
((eq system-type 'windows-nt) 30)
(t 14))
:weight normal
:width normal
:powerline-scale 1.3)
dotspacemacs-leader-key "SPC"
dotspacemacs-emacs-command-key "SPC"
dotspacemacs-ex-command-key ":"
dotspacemacs-emacs-leader-key "M-m"
dotspacemacs-major-mode-leader-key ","
dotspacemacs-major-mode-emacs-leader-key "C-M-m"
dotspacemacs-distinguish-gui-tab t
dotspacemacs-default-layout-name "Default"
dotspacemacs-display-default-layout nil
dotspacemacs-auto-resume-layouts nil
dotspacemacs-auto-generate-layout-names nil
dotspacemacs-large-file-size 100
dotspacemacs-auto-save-file-location 'cache
dotspacemacs-max-rollback-slots 5
dotspacemacs-helm-resize nil
dotspacemacs-helm-no-header nil
dotspacemacs-helm-position 'bottom
dotspacemacs-helm-use-fuzzy 'always
dotspacemacs-enable-paste-transient-state nil
dotspacemacs-which-key-delay 0.4
dotspacemacs-which-key-position 'bottom
dotspacemacs-switch-to-buffer-prefers-purpose nil
dotspacemacs-loading-progress-bar t
dotspacemacs-fullscreen-at-startup nil
dotspacemacs-fullscreen-use-non-native nil
dotspacemacs-maximized-at-startup nil
dotspacemacs-active-transparency 90
dotspacemacs-inactive-transparency 90
dotspacemacs-show-transient-state-title t
dotspacemacs-show-transient-state-color-guide t
dotspacemacs-mode-line-unicode-symbols nil
dotspacemacs-smooth-scrolling t
dotspacemacs-line-numbers nil
dotspacemacs-folding-method 'origami
dotspacemacs-smartparens-strict-mode nil
dotspacemacs-smart-closing-parenthesis nil
dotspacemacs-highlight-delimiters 'current
dotspacemacs-enable-server t
dotspacemacs-persistent-server nil
;; MAYBE: favor rg when we are sufficiently confident in it
dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
dotspacemacs-frame-title-format "%I: %b"
dotspacemacs-icon-title-format nil
dotspacemacs-whitespace-cleanup 'trailing
dotspacemacs-zone-out-when-idle nil
dotspacemacs-pretty-docs nil))
(defun dotspacemacs/user-init ()
(setq yxl-path-dotfiles "~/dotfiles/")
(setq yxl-path-personal "~/dotfiles/personal/")
(setq custom-file (expand-file-name "custom.el" dotspacemacs-directory))
;; load path
;; Project structure:
;; - config: ideally only configuration code, i.e. no defun
;; - lisp: self funcs and routines, global to the project
;; - site-lisp: 3rd-party original / self-modified modules
;; - theme: colorschemes and ui stuff
(dolist (path
`(,(concat dotspacemacs-directory "config")
,(concat dotspacemacs-directory "lisp")
,(concat dotspacemacs-directory "site-lisp")
,(concat dotspacemacs-directory "theme/yxl-theme")
,(concat dotspacemacs-directory "theme/yxl-airline")
,(concat dotspacemacs-directory "theme/yxl-airline-theme")
,(concat yxl-path-dotfiles "yxl-emacs-goodies")
,(concat yxl-path-dotfiles "yxl-emacs-datascience-goodies")))
(add-to-list 'load-path path))
(dolist (path
`(,(concat dotspacemacs-directory "theme/yxl-theme")
,(concat dotspacemacs-directory "theme/yxl-airline-theme")))
(add-to-list 'custom-theme-load-path path))
;; init stage config
(load-file (concat dotspacemacs-directory "config/config-init.el"))
(load-file (concat yxl-path-personal "personal-init.el"))
(load custom-file 'no-error 'no-message))
(defun dotspacemacs/user-config ()
(load-file (concat dotspacemacs-directory "config/config-post-init.el"))
(load-file (concat dotspacemacs-directory "config/yxl-global-keybindings.el")))
(defun dotspacemacs/emacs-custom-settings ())