-
Notifications
You must be signed in to change notification settings - Fork 14
/
init.el
479 lines (443 loc) · 14.3 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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
;;;;
;; Packages
;;;;
;; Define package repositories
(require 'package)
(add-to-list 'package-archives
'("tromey" . "http://tromey.com/elpa/") t)
(add-to-list 'package-archives
'("org" . "http://orgmode.org/elpa/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives
'("melpa-stable" . "http://stable.melpa.org/packages/") t)
(add-to-list 'package-pinned-packages '(cider . "melpa-stable") t)
;; (add-to-list 'package-pinned-packages '(clj-refactor . "melpa-stable") t)
(add-to-list 'package-pinned-packages '(magit . "melpa-stable") t)
;; (add-to-list 'package-pinned-packages '(helm-projectile . "melpa-stable") t)
(add-to-list 'package-pinned-packages '(flycheck . "melpa-stable") t)
;; Load and activate emacs packages. Do this first so that the
;; packages are loaded before you start trying to modify them.
;; This also sets the load path.
(package-initialize)
(setq package-enable-at-startup nil)
;; (require 'use-package)
;; Download the ELPA archive description if needed.
;; This informs Emacs about the latest versions of all packages, and
;; makes them available for download.
(when (not package-archive-contents)
(package-refresh-contents))
(defvar ido-cur-item nil)
(defvar ido-default-item nil)
(defvar ido-context-switch-command nil)
(defvar ido-cur-list nil)
(defvar predicate nil)
(defvar inherit-input-method nil)
;; The packages you want installed. You can also install these
;; manually with M-x package-install
;; Add in your own as you wish:
(defvar my-packages
'(;; makes handling lisp expressions much, much easier
;; Cheatsheet: http://www.emacswiki.org/emacs/PareditCheatsheet
paredit
;; key bindings and code colorization for Clojure
;; https://github.com/clojure-emacs/clojure-mode
clojure-mode
;; extra syntax highlighting for clojure
clojure-mode-extra-font-locking
;; integration with a Clojure REPL
;; https://github.com/clojure-emacs/cider
cider
;; one of the best clojure packages
clj-refactor
;; allow ido usage in as many contexts as possible. see
;; customizations/better-defaults.el line 47 for a description
;; of ido
ido-ubiquitous
;; Enhances M-x to allow easier execution of commands. Provides
;; a filterable list of possible commands in the minibuffer
;; http://www.emacswiki.org/emacs/Smex
smex
;; On OS X, an Emacs instance started from the graphical user
;; interface will have a different environment than a shell in a
;; terminal window, because OS X does not run a shell during the
;; login. Obviously this will lead to unexpected results when
;; calling external utilities like make from Emacs.
;; This library works around this problem by copying important
;; environment variables from the user's shell.
;; https://github.com/purcell/exec-path-from-shell
exec-path-from-shell
;; project navigation
projectile
;; colorful parenthesis matching
rainbow-delimiters
;; edit html tags like sexps
tagedit
;; git integration
magit
;; https://github.com/bbatsov/crux
crux
yaml-mode
coffee-mode
scss-mode
haskell-mode
company
ack-and-a-half
ag
adoc-mode
aggressive-indent
web-mode
enh-ruby-mode
base16-theme
git-gutter
helm
helm-ag
helm-git-grep
helm-projectile
helm-descbinds
yasnippet
use-package
flycheck))
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
;; Place downloaded elisp files in ~/.emacs.d/vendor. You'll then be able
;; to load them.
;;
;; For example, if you download yaml-mode.el to ~/.emacs.d/vendor,
;; then you can add the following code to this file:
;;
;; (require 'yaml-mode)
;; (add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
;;
;; Adding this code will make Emacs enter yaml mode whenever you open
;; a .yml file
(add-to-list 'load-path "~/.emacs.d/vendor")
;;;;
;; Customization
;;;;
;; Add a directory to our load path so that when you `load` things
;; below, Emacs knows where to look for the corresponding file.
(add-to-list 'load-path "~/.emacs.d/customizations")
;; Sets up exec-path-from-shell so that Emacs will use the correct
;; environment variables
(load "shell-integration.el")
;; These customizations make it easier for you to navigate files,
;; switch buffers, and choose options from the minibuffer.
(load "navigation.el")
;; These customizations change the way emacs looks and disable/enable
;; some user interface elements
(load "ui.el")
;; These customizations make editing a bit nicer.
(load "editing.el")
;; Hard-to-categorize customizations
(load "misc.el")
;; For editing lisps
(load "elisp-editing.el")
;; helm
(load "setup-helm.el")
(load "setup-company.el")
;; Langauage-specific
(load "setup-clojure.el")
(load "setup-js.el")
(load "setup-css.el")
(load "setup-yaml.el")
(load "setup-org.el")
(load "setup-prolog.el")
(load "setup-ruby.el")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default bold shadow italic underline bold bold-italic bold])
'(ansi-color-names-vector
(vector "#c5c8c6" "#cc6666" "#b5bd68" "#f0c674" "#81a2be" "#b294bb" "#8abeb7" "#373b41"))
'(cider-cljs-lein-repl
"(do (require 'figwheel-sidecar.repl-api) (figwheel-sidecar.repl-api/start-figwheel!) (figwheel-sidecar.repl-api/cljs-repl))")
'(coffee-tab-width 2)
'(custom-safe-themes
(quote
("4486ade2acbf630e78658cd6235a5c6801090c2694469a2a2b4b0e12227a64b9" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" default)))
'(fci-rule-color "#373b41")
'(org-agenda-files (quote ("~/Dropbox/org-life/master.org")))
'(package-selected-packages
(quote
(flycheck-clj-kondo flycheck typescript-mode terraform-mode jsx-mode chruby seeing-is-believing inf-ruby asciidoc cider sesman sass-mode swiper-helm counsel ivy powerline monokai-theme atom-one-dark-theme dracula-theme clojure-mode-extra-font-locking django-mode csv-mode csv doom-themes markdown-mode+ moe-theme org-bullets ac-cider base16-theme clojure-mode scss-mode yaml-mode web-mode use-package thesaurus tagedit smex rainbow-delimiters php-mode noflet markdown-mode magit ido-ubiquitous helm-projectile helm-ls-git helm-git-grep helm-descbinds helm-ag haskell-mode haml-mode git-gutter exec-path-from-shell enh-ruby-mode dockerfile-mode csharp-mode crux company color-theme-sanityinc-tomorrow coffee-mode clj-refactor aggressive-indent ag adoc-mode adjust-parens ack-and-a-half)))
'(safe-local-variable-values
(quote
((eval progn
(put
(quote defendpoint)
(quote clojure-doc-string-elt)
3)
(put
(quote defendpoint-async)
(quote clojure-doc-string-elt)
3)
(put
(quote api/defendpoint)
(quote clojure-doc-string-elt)
3)
(put
(quote api/defendpoint-async)
(quote clojure-doc-string-elt)
3)
(put
(quote defsetting)
(quote clojure-doc-string-elt)
2)
(put
(quote setting/defsetting)
(quote clojure-doc-string-elt)
2)
(put
(quote s/defn)
(quote clojure-doc-string-elt)
2)
(put
(quote p\.types/defprotocol+)
(quote clojure-doc-string-elt)
2)
(define-clojure-indent
(assert 1)
(ex-info 1)
(expect 0)
(let-404 1)
(match 1)
(merge-with 1)
(p\.types/defprotocol+
(quote
(1
(:defn))))
(p\.types/def-abstract-type
(quote
(1
(:defn))))
(p\.types/deftype+
(quote
(2 nil nil
(:defn))))
(p\.types/defrecord+
(quote
(2 nil nil
(:defn))))))
(eval progn
(put
(quote p\.types/defprotocol+)
(quote clojure-doc-string-elt)
2)
(define-clojure-indent
(p\.types/defprotocol+
(quote
(1
(:defn))))
(p\.types/definterface+
(quote
(1
(:defn))))
(p\.types/def-abstract-type
(quote
(1
(:defn))))
(p\.types/deftype+
(quote
(2 nil nil
(:defn))))
(p\.types/defrecord+
(quote
(2 nil nil
(:defn))))))
(eval progn
(put
(quote defendpoint)
(quote clojure-doc-string-elt)
3)
(put
(quote defendpoint-async)
(quote clojure-doc-string-elt)
3)
(put
(quote api/defendpoint)
(quote clojure-doc-string-elt)
3)
(put
(quote api/defendpoint-async)
(quote clojure-doc-string-elt)
3)
(put
(quote defsetting)
(quote clojure-doc-string-elt)
2)
(put
(quote setting/defsetting)
(quote clojure-doc-string-elt)
2)
(put
(quote s/defn)
(quote clojure-doc-string-elt)
2)
(put
(quote p\.types/defprotocol+)
(quote clojure-doc-string-elt)
2)
(define-clojure-indent
(assert 1)
(ex-info 1)
(expect 0)
(let-404 1)
(match 1)
(merge-with 1)
(with-redefs-fn 1)
(p\.types/defprotocol+
(quote
(1
(:defn))))
(p\.types/def-abstract-type
(quote
(1
(:defn))))
(p\.types/deftype+
(quote
(2 nil nil
(:defn))))
(p\.types/defrecord+
(quote
(2 nil nil
(:defn))))))
(eval progn
(put
(quote defendpoint)
(quote clojure-doc-string-elt)
3)
(put
(quote defendpoint-async)
(quote clojure-doc-string-elt)
3)
(put
(quote api/defendpoint)
(quote clojure-doc-string-elt)
3)
(put
(quote api/defendpoint-async)
(quote clojure-doc-string-elt)
3)
(put
(quote defsetting)
(quote clojure-doc-string-elt)
2)
(put
(quote setting/defsetting)
(quote clojure-doc-string-elt)
2)
(put
(quote s/defn)
(quote clojure-doc-string-elt)
2)
(define-clojure-indent
(assert 1)
(assoc 1)
(ex-info 1)
(expect 0)
(match 1)
(merge-with 1)
(with-redefs-fn 1)))
(cljr-favor-prefix-notation . t)
(eval progn
(put
(quote defendpoint)
(quote clojure-doc-string-elt)
3)
(put
(quote defendpoint-async)
(quote clojure-doc-string-elt)
3)
(put
(quote api/defendpoint)
(quote clojure-doc-string-elt)
3)
(put
(quote api/defendpoint-async)
(quote clojure-doc-string-elt)
3)
(put
(quote defsetting)
(quote clojure-doc-string-elt)
2)
(put
(quote setting/defsetting)
(quote clojure-doc-string-elt)
2)
(put
(quote s/defn)
(quote clojure-doc-string-elt)
2)
(put
(quote p\.types/defprotocol+)
(quote clojure-doc-string-elt)
2)
(define-clojure-indent
(assert 1)
(ex-info 1)
(expect 0)
(match 1)
(merge-with 1)
(with-redefs-fn 1)
(p\.types/defprotocol+
(quote
(1
(:defn))))
(p\.types/def-abstract-type
(quote
(1
(:defn))))
(p\.types/deftype+
(quote
(2 nil nil
(:defn))))
(p\.types/defrecord+
(quote
(2 nil nil
(:defn))))))
(cider-ns-refresh-after-fn . "integrant.repl/resume")
(cider-ns-refresh-before-fn . "integrant.repl/suspend")
(cider-refresh-after-fn . "integrant.repl/resume")
(cider-refresh-before-fn . "integrant.repl/suspend"))))
'(vc-annotate-background nil)
'(vc-annotate-color-map
(quote
((20 . "#cc6666")
(40 . "#de935f")
(60 . "#f0c674")
(80 . "#b5bd68")
(100 . "#8abeb7")
(120 . "#81a2be")
(140 . "#b294bb")
(160 . "#cc6666")
(180 . "#de935f")
(200 . "#f0c674")
(220 . "#b5bd68")
(240 . "#8abeb7")
(260 . "#81a2be")
(280 . "#b294bb")
(300 . "#cc6666")
(320 . "#de935f")
(340 . "#f0c674")
(360 . "#b5bd68"))))
'(vc-annotate-very-old-color nil))
;; (custom-set-faces
;; ;; custom-set-faces was added by Custom.
;; ;; If you edit it by hand, you could mess it up, so be careful.
;; ;; Your init file should contain only one such instance.
;; ;; If there is more than one, they won't work right.
;; '(org-level-2 ((t (:foreground "#5fb3b3"))))
;; '(org-level-4 ((t (:foreground "#ddc794")))))
(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)