-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathearly-init.el
175 lines (130 loc) · 5.86 KB
/
early-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
;;; early-init.el --- Early startup for Farlado's Illiterate GNU Emacs
;; This file is not part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; This file has been automatically tangled from `literate-emacs.org'.
;; If you don't have a copy of that file, it is best not to use this file!
;; All relevant commentary is in `literate-emacs.org', not here.
;; There may not be any comments past this point.
;; Abandon all hope, ye who enter here.
;;; Code:
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(when (getenv "_RUN_EXWM")
(set-face-background 'default "#282a36"))
(defvar pdumper-dumped nil
"Non-nil if a custom dump image was loaded.")
(defvar pdumper-load-path nil
"Contains `load-path' if a custom dump image was loaded.")
(defun pdumper-require (feature &optional filename noerror)
"Call `require' to load FEATURE if `pdumper-dumped' is nil.
FILENAME and NOERROR are also passed to `require'."
(unless pdumper-dumped
(require feature filename noerror)))
(defun pdumper-fix-scratch-buffer ()
"Ensure the scratch buffer is properly loaded."
(with-current-buffer "*scratch*"
(lisp-interaction-mode)))
(when pdumper-dumped
(add-hook 'after-init-hook #'pdumper-fix-scratch-buffer)
(setq load-path pdumper-load-path)
(global-font-lock-mode 1)
(transient-mark-mode 1)
(blink-cursor-mode 1))
(defun farl-init/compile-user-emacs-directory ()
"Recompile all files in `user-emacs-directory'."
(byte-recompile-directory user-emacs-directory 0))
(unless (file-exists-p (locate-user-emacs-file "init.elc"))
(add-hook 'after-init-hook #'farl-init/compile-user-emacs-directory))
(setq load-prefer-newer t)
(setq-default apropos-do-all t)
(defvar startup/file-name-handler-alist file-name-handler-alist
"Temporary storage for `file-name-handler-alist' during startup.")
(defun startup/revert-file-name-handler-alist ()
"Revert `file-name-handler-alist' to its default value after startup."
(setq file-name-handler-alist startup/file-name-handler-alist))
(setq file-name-handler-alist nil)
(add-hook 'emacs-startup-hook #'startup/revert-file-name-handler-alist)
(defun garbage-collect-defer ()
"Defer garbage collection."
(setq gc-cons-threshold most-positive-fixnum
gc-cons-percentage 0.6))
(defun garbage-collect-restore ()
"Return garbage collection to normal parameters."
(setq gc-cons-threshold 16777216
gc-cons-percentage 0.1))
(garbage-collect-defer)
(add-hook 'emacs-startup-hook #'garbage-collect-restore)
(setq custom-file "/tmp/custom.el"
package-selected-packages '(;; Core
async
use-package
auto-package-update
try
;; Looks
dracula-theme
mood-line
dashboard
page-break-lines
rainbow-mode
rainbow-delimiters
;; Functionality
which-key
counsel
company
company-emoji
buffer-move
sudo-edit
;; Text Editing
graphviz-dot-mode
markdown-mode
swiper
popup-kill-ring
hungry-delete
avy
;; Programming
magit
haskell-mode
company-jedi
flycheck
flycheck-package
flycheck-posframe
avy-flycheck
;; `org-mode'
toc-org
org-bullets
epresent
;; Extend
nov
wttrin
;; Games
yahtzee
sudoku
chess
2048-game
;; Other
emms
;; Desktop Environment
exwm
minibuffer-line
system-packages
desktop-environment
wallpaper))
(pdumper-require 'package)
(defun package--save-selected-packages (&rest opt)
"Return nil, ignoring OPT.
This function was altered to inhibit a specific undesired behavior."
nil)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
;;; early-init.el ends here