blob: 3eab8f943618d27d1b58c48539ffb77e79998cb1 (
plain)
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
|
#+title: Emacs Early Initialization
Set high =gc-cons-threshold= while booting.
#+begin_src emacs-lisp
(setq gc-cons-threshold most-positive-fixnum)
#+end_src
Disable =package.el= at startup so that =elpaca= can enable it on its own.
#+begin_src emacs-lisp
(setq package-enable-at-startup nil)
#+end_src
Force the use of a =custom.el= file instead of appending to =init.el=.
#+begin_src emacs-lisp
(setq custom-file (concat user-emacs-directory "custom.el"))
(when (file-exists-p custom-file)
(load custom-file))
#+end_src
Disable the default startup screen so Emacs starts in the =scratch= buffer and also defaults to an empty =scratch= buffer.
#+begin_src emacs-lisp
(setq inhibit-startup-screen t
initial-scratch-message nil)
#+end_src
Clean up interface by removing unnecessary elements.
#+begin_src emacs-lisp
(add-to-list 'default-frame-alist '(vertical-scroll-bars . nil))
(push '(tool-bar-lines . 0) default-frame-alist)
(menu-bar-mode -1)
(setq frame-resize-pixelwise t)
#+end_src
Set up fonts. I use Source Code Pro (Nerd Font) for =monospace= and Computer Modern for /variable width/.
#+begin_src emacs-lisp
(defvar jj/mono-font)
(defvar jj/var-font)
(pcase system-type
(`gnu/linux
(setq jj/mono-font "SauceCodePro Nerd Font-11"
jj/var-font "CMU Serif-14"))
(`darwin
(setq jj/mono-font "SauceCodePro Nerd Font-14:weight=thin"
jj/var-font "CMU Serif-18")))
(add-to-list 'default-frame-alist
`(font . ,jj/mono-font))
(custom-set-faces
`(variable-pitch ((t :font ,jj/var-font)))
`(fixed-pitch ((t :font ,jj/mono-font))))
#+end_src
Default to =modus-operandi= theme for a highly legible light theme.
#+begin_src emacs-lisp
(load-theme 'modus-operandi)
#+end_src
|