-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
278 lines (219 loc) · 4.52 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
;;; init --- The main emacs user init file.
;;; Commentary:
;;; Code:
;;;
;; The flx-ido readme reccomends increasing the gc-cons-threshold to
;; at least 20 MB.
;; (setq gc-cons-threshold 30000000)
;; Byte compile all files in the .emacs.d/lisp folder. Force byte compilation
;; even if there is no existing .elc file for the .el file.
;; (byte-recompile-directory "~/.emacs.d/lisp" 0)
;; To revaluate elisp code you can use one of the following options.
;; C-M-x will call eval-defun which evaluates the top level form
;; containing point.
;; C-x C-e will call eval-last-sexp which evaluates the sexp before
;; point and then prints the value in the echo area.
;; To evaluate the entire buffer you can call M-x eval-buffer
;; To evaluate the region you can call M-x eval-region
;; If the .el file is newer than the .elc file then load the .el file.
(setq load-prefer-newer t)
;;
;; Setup GnuTLS
;;
;; This is required for some reason on macOS.
(require 'gnutls)
(add-to-list 'gnutls-trustfiles "/etc/ssl/cert.pem")
;;
;; Package management
;;
(require 'package)
;; We do not want to call package-initialize again after the init file has
;; been loaded.
(setq package-enable-at-startup nil)
;; Add package archives
;;(add-to-list 'package-archives '("marmalade" . "https://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
;; (add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
;; To update the packages (or is it the index of packages?) run (package-refresh-contents)
;; You can also run M-x package-list-packages. This will also update the list of packages.
;;
;; Load path
;;
;; Store custom elisp files in the /elisp subdirectory of the dot emacs folder.
;; https://www.emacswiki.org/emacs/DotEmacsDotD
(add-to-list 'load-path (concat user-emacs-directory (convert-standard-filename "lisp/")))
;;
;; Customize system
;;
;; Safe code. The error message about safe code has something to do with custom-set-variables not having been
;; called before the theme is loaded.
;; I do not want generated code in my init.el file.
;; Make the customize system write to a temp file that is deleted.
(setq custom-file (make-temp-file "emacs-custom"))
;;;
;;; Customizations
;;;
;;
;; Emacs specific setup
;;
(load "setup-emacs")
;;
;; Exec path
;;
(load "setup-exec-path")
;;
;; Hostname functions
;;
(load "setup-hostname")
;;
;; Setup bookmark functions
;;
(load "setup-bookmarks")
;;
;; Eshell setup
;;
(load "setup-eshell")
;;
;; Emacs server
;;
(load "setup-server")
;;
;; Rainbow delimiters
;;
(load "setup-rainbow-delimiters")
;;
;; User interface specific setup
;;
(load "setup-ui")
;;
;; Window numbering
;;
(load "setup-winum")
;;
;; Window Configuration
;;
(load "setup-window-configuration")
;;
;; Setup editing with Emacs
;;
(load "setup-editing")
;;
;; Theme specific setup
;;
(load "setup-theme")
;;
;; Ag specific setup
;;
(load "setup-ag")
;;
;; Clojure specific setup
;;
(load "setup-clojure")
;;
;; Shell specific setup
;;
(load "setup-shell")
;;
;; Xterm color setup
;;
(load "setup-xterm-color")
;;
;; Bash specific setup
;;
(load "setup-bash")
;;
;; Fish specific setup
;;
(load "setup-fish")
;;
;; OS X specific setup
;;
(if (string-equal system-type "darwin")
(load "setup-mac"))
;;
;; Unix specific setup
;;
(unless (string-equal system-type "darwin")
(load "setup-unix"))
;;
;; Eldoc mode specific setup
;;
(load "setup-eldoc")
;;
;; Which key setup
;;
(load "setup-which-key")
;;
;; Text mode specific setup
;;
(load "setup-text")
;;
;; Tramp specific setup
;;
(load "setup-tramp")
;;
;; Python specific setup
;;
(load "setup-python")
;;
;; Common Lisp specific setup
;;
(load "setup-common-lisp")
;;
;; Lua specific setup
;;
;; (load "setup-lua")
;;
;; Erlang specific setup
;;
;; (load "setup-erlang")
;;
;; Elixir specific setup
;;
;; (load "setup-elixir")
;;
;; Execute shell commands and place the result in the current buffer.
;;
(load "setup-shell-command")
;;
;; Web mode specific setup
;;
(load "setup-web-mode")
;;
;; Editor Config specific setup
;;
(load "setup-editor-config")
;;
;; Flycheck specific setup
;;
(load "setup-flycheck")
;;
;; Flyspell specific setup
;;
(load "setup-flyspell")
;;
;; Scheme specific setup
;;
(load "setup-scheme")
;;
;; Golang specific setup
;;
(load "setup-go")
;;
;; YAML specific setup
;;
(load "setup-yaml")
;;
;; JSON specific setup
;;
(load "setup-json")
;;
;; JavaScript specific setup
;;
(load "setup-javascript")
;;
;; Todo specific setup
;;
(load "setup-todo")
(provide 'init)
;;; init.el ends here.