-
Notifications
You must be signed in to change notification settings - Fork 23
/
init.el
86 lines (72 loc) · 2.24 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
;;; init.el --- The main entry for emacs -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
;; A big contributor to startup times is garbage collection. We up the gc
;; threshold to temporarily prevent it from running, and then reset it by the
;; `gcmh' package.
(setq gc-cons-threshold most-positive-fixnum
gc-cons-percentage 0.6)
;; Increase how much is read from processes in a single chunk (default is 4kb).
;; `lsp-mode' benefits from that.
;;
;; `cat /proc/sys/fs/pipe-max-size` to check the max value.
(setq read-process-output-max (* 4 1024 1024))
(require 'package)
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")
("nongnu" . "https://elpa.nongnu.org/nongnu/")))
;; Bootstrap `use-package'
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-and-compile
(setq use-package-always-ensure nil)
(setq use-package-always-defer nil)
(setq use-package-always-demand nil)
(setq use-package-expand-minimally nil)
(setq use-package-enable-imenu-support t))
(eval-when-compile
(require 'use-package))
;; Keep ~/.emacs.d/ clean.
(use-package no-littering
:ensure t
:demand t)
;; Bootstrap `quelpa'.
(use-package quelpa
:ensure t
:commands quelpa
:custom
(quelpa-git-clone-depth 1)
(quelpa-self-upgrade-p nil)
(quelpa-update-melpa-p nil)
(quelpa-checkout-melpa-p nil))
;; --debug-init implies `debug-on-error'.
(setq debug-on-error init-file-debug)
(let ((dir (locate-user-emacs-file "lisp")))
(add-to-list 'load-path (file-name-as-directory dir))
(add-to-list 'load-path (file-name-as-directory (expand-file-name "lang" dir))))
(setq custom-file (locate-user-emacs-file "custom.el"))
(require 'init-base)
(require 'init-utils)
(require 'init-ui)
(require 'init-tools)
(require 'init-evil)
(require 'init-lsp)
(require 'init-git)
(require 'init-dev)
(require 'init-dired)
(require 'init-minibuffer)
;; standalone apps
(require 'init-org)
(require 'init-text)
(require 'init-mail)
(require 'init-shell)
(require 'init-spell)
;; MacOS specific
(when (eq system-type 'darwin)
(require 'init-osx))
(when (file-exists-p custom-file)
(load custom-file))
(provide 'init)
;;; init.el ends here