-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
56 lines (47 loc) · 1.68 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
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(eval-when-compile (require 'cl))
(lexical-let ((emacs-start-time (current-time)))
(add-hook 'emacs-startup-hook
(lambda ()
(let ((elapsed (float-time (time-subtract (current-time) emacs-start-time))))
(message "[Emacs initialized in %\.3fs]" elapsed)))))
; 100MB
(setq gc-cons-threshold 100000000)
(setq read-process-output-max (* 1024 1024)) ;; 1mb
(add-hook 'emacs-startup-hook 'toggle-frame-maximized)
;; Load all lisp files
(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))
; Prevent blob at bottom of init.el
(setq custom-file (concat user-emacs-directory "custom.el"))
(load custom-file 'noerror)
(setq dotemacs-cache-directory (concat user-emacs-directory ".cache/"))
(defmacro after (feature &rest body)
(declare (indent 1))
(cond
((vectorp feature)
(let ((prog (macroexp-progn body)))
(cl-loop for f across feature
do
(progn
(setq prog (append `(',f) `(,prog)))
(setq prog (append '(with-eval-after-load) prog))))
prog))
(t
`(with-eval-after-load ,feature ,@body))))
(require 'init-elpa)
(require 'init-core)
(require 'init-evil)
(require 'init-helm)
(require 'init-company)
(require 'init-theme)
(require 'init-flycheck)
(require 'init-eshell)
(require 'init-org)
(require 'init-misc)
(require 'init-util)
(require 'init-hydra)
(require 'init-bindings)
(setq default-directory "~/" )