-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
52 lines (43 loc) · 1.69 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
;;; init.el --- The first thing GNU Emacs runs
;; Free up screen real estate
(menu-bar-mode -1)
(scroll-bar-mode -1)
(tool-bar-mode -1)
;; Do NOT run garbage collection during startup!
;; We do this by setting the value insanely high.
;; NOTE: This is reverted at the end of the file.
(setq gc-cons-threshold 999999999)
(message "gc-cons-threshold temporarily set to %S"
gc-cons-threshold)
;; Ignore default REGEXP checks at startup
;; NOTE: This drastically improves `emacs-init-time'
(let ((file-name-handler-alist nil))
;; TODO: Make this platform independent
;; Set up package.el for use with MELPA
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
;; Bootstrap use-package
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
;; Reduce load time
(eval-when-compile
(require 'use-package))
(require 'diminish) ; used to hide modeline strings
(require 'bind-key) ; simplifies how you set keybindings
;; Install packages automatically if not already present on the system
(setq use-package-always-ensure t)
;; TODO: Make this less absolute
;; Load the rest of my configuration
(org-babel-load-file "~/.emacs.d/geoff.org")
;; TODO: Make this platform independent
;; Load some more "private" settings
(org-babel-load-file "~/../../Nextcloud/org/.private.org")
;; Revert garbage colletion behaviour back to a more normal, modern value
(run-with-idle-timer 5 nil (lambda ()
(setq gc-cons-threshold 200000)
(message "gc-cons-threshold restored to %S"
gc-cons-threshold))))