forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
172 lines (141 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
;; -*- lexical-binding: t -*-
(setq debug-on-error t)
;;; This file bootstraps the configuration, which is divided into
;;; a number of other files.
(let ((minver "24.4"))
(when (version< emacs-version minver)
(error "Your Emacs is too old -- this config requires v%s or higher" minver)))
(when (version< emacs-version "25.1")
(message "Your Emacs is old, and some functionality in this config will be disabled. Please upgrade if possible."))
(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))
(require 'init-benchmarking) ;; Measure startup time
(defconst *spell-check-support-enabled* nil) ;; Enable with t if you prefer
(defconst *is-a-mac* (eq system-type 'darwin))
;;----------------------------------------------------------------------------
;; Adjust garbage collection thresholds during startup, and thereafter
;;----------------------------------------------------------------------------
(let ((normal-gc-cons-threshold (* 20 1024 1024))
(init-gc-cons-threshold (* 128 1024 1024)))
(setq gc-cons-threshold init-gc-cons-threshold)
(add-hook 'emacs-startup-hook
(lambda () (setq gc-cons-threshold normal-gc-cons-threshold))))
;;----------------------------------------------------------------------------
;; Bootstrap config
;;----------------------------------------------------------------------------
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(require 'init-utils)
(require 'init-site-lisp) ;; Must come before elpa, as it may provide package.el
;; Calls (package-initialize)
(require 'init-elpa) ;; Machinery for installing required packages
(require 'init-exec-path) ;; Set up $PATH
;;----------------------------------------------------------------------------
;; Allow users to provide an optional "init-preload-local.el"
;;----------------------------------------------------------------------------
(require 'init-preload-local nil t)
;;----------------------------------------------------------------------------
;; Load configs for specific features and modes
;;----------------------------------------------------------------------------
(require-package 'wgrep)
(require-package 'diminish)
(require-package 'scratch)
(require-package 'command-log-mode)
(require 'init-frame-hooks) ;; unclear
(require 'init-xterm) ;; scroll with mouse in emacs??1
(require 'init-themes) ;; changes themes
(require 'init-osx-keys) ;; i unno
(require 'init-gui-frames)
(require 'init-dired);; the directory buffer -- make it better
(require 'init-isearch) ;; you might need these commands
(require 'init-grep) ;; use better grepping tools
(require 'init-uniquify) ;; uniquify names of buffers
(require 'init-ibuffer) ;; ibuffer is good for operating on multiple buffers
(require 'init-flycheck) ;; syntax checking
(require 'init-recentf) ;; for looking for recent files
(require 'init-smex);; better way of doing M-x
(require 'init-ivy) ;; completions: http://oremacs.com/swiper/
(require 'init-hippie-expand) ;; for expanding at point
(require 'init-company) ;; complete anything lib
(require 'init-windows) ;; window mgmt
(require 'init-sessions) ;; save windows when editing
(require 'init-fonts)
(require 'init-mmm) ;; multiple major modes
(require 'init-editing-utils)
(require 'init-whitespace)
(require 'init-vc)
(require 'init-git)
(require 'init-github)
(require 'init-projectile)
(require 'init-compile)
(require 'init-textile)
(require 'init-markdown)
(require 'init-csv)
(require 'init-javascript)
(require 'init-php)
(require 'init-org)
(require 'init-nxml)
(require 'init-html)
(require 'init-css)
(require 'init-haml)
(require 'init-http)
(require 'init-python)
(require 'init-haskell)
(require 'init-elm)
(require 'init-purescript)
(require 'init-ruby)
(require 'init-rails)
(require 'init-sql)
(require 'init-rust)
(require 'init-toml)
(require 'init-yaml)
(require 'init-docker)
(require 'init-terraform)
;;(require 'init-nix)
(maybe-require-package 'nginx-mode)
(require 'init-bazel)
(require 'init-paredit)
(require 'init-lisp)
(require 'init-slime)
(require 'init-common-lisp)
(require 'init-go)
(require `init-protobuf)
(when *spell-check-support-enabled*
(require 'init-spelling))
(require 'init-misc)
(require 'init-folding)
;; Extra packages which don't require any configuration
(require-package 'htmlize)
(require-package 'dsvn)
(when *is-a-mac*
(require-package 'osx-location))
(unless (eq system-type 'windows-nt)
(maybe-require-package 'daemons))
(maybe-require-package 'dotenv-mode)
(when (maybe-require-package 'uptimes)
(setq-default uptimes-keep-count 200)
(add-hook 'after-init-hook (lambda () (require 'uptimes))))
;;----------------------------------------------------------------------------
;; Allow access from emacsclient
;;----------------------------------------------------------------------------
(add-hook 'after-init-hook
(lambda ()
(require 'server)
(unless (server-running-p)
(server-start))))
;;----------------------------------------------------------------------------
;; Variables configured via the interactive 'customize' interface
;;----------------------------------------------------------------------------
(when (file-exists-p custom-file)
(load custom-file))
;;----------------------------------------------------------------------------
;; Locales (setting them earlier in this file doesn't work in X)
;;----------------------------------------------------------------------------
(require 'init-locales)
;;----------------------------------------------------------------------------
;; Allow users to provide an optional "init-local" containing personal settings
;;----------------------------------------------------------------------------
(require 'init-local nil t)
(provide 'init)
;; Local Variables:
;; coding: utf-8
;; no-byte-compile: t
;; End: