2018-04-03 19:48:20 -04:00
|
|
|
;;; init.el -*- lexical-binding: t; -*-
|
|
|
|
;;
|
|
|
|
;; Author: Henrik Lissner <henrik@lissner.net>
|
|
|
|
;; URL: https://github.com/hlissner/doom-emacs
|
|
|
|
;;
|
|
|
|
;; ================= =============== =============== ======== ========
|
|
|
|
;; \\ . . . . . . .\\ //. . . . . . .\\ //. . . . . . .\\ \\. . .\\// . . //
|
|
|
|
;; ||. . ._____. . .|| ||. . ._____. . .|| ||. . ._____. . .|| || . . .\/ . . .||
|
|
|
|
;; || . .|| ||. . || || . .|| ||. . || || . .|| ||. . || ||. . . . . . . ||
|
|
|
|
;; ||. . || || . .|| ||. . || || . .|| ||. . || || . .|| || . | . . . . .||
|
|
|
|
;; || . .|| ||. _-|| ||-_ .|| ||. . || || . .|| ||. _-|| ||-_.|\ . . . . ||
|
|
|
|
;; ||. . || ||-' || || `-|| || . .|| ||. . || ||-' || || `|\_ . .|. .||
|
|
|
|
;; || . _|| || || || || ||_ . || || . _|| || || || |\ `-_/| . ||
|
|
|
|
;; ||_-' || .|/ || || \|. || `-_|| ||_-' || .|/ || || | \ / |-_.||
|
|
|
|
;; || ||_-' || || `-_|| || || ||_-' || || | \ / | `||
|
|
|
|
;; || `' || || `' || || `' || || | \ / | ||
|
|
|
|
;; || .===' `===. .==='.`===. .===' /==. | \/ | ||
|
|
|
|
;; || .==' \_|-_ `===. .===' _|_ `===. .===' _-|/ `== \/ | ||
|
|
|
|
;; || .==' _-' `-_ `=' _-' `-_ `=' _-' `-_ /| \/ | ||
|
|
|
|
;; || .==' _-' '-__\._-' '-_./__-' `' |. /| | ||
|
|
|
|
;; ||.==' _-' `' | /==.||
|
|
|
|
;; ==' _-' \/ `==
|
|
|
|
;; \ _-' `-_ /
|
|
|
|
;; `'' ``'
|
|
|
|
;;
|
|
|
|
;; These demons are not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: MIT
|
|
|
|
|
2018-08-31 23:40:54 +02:00
|
|
|
(defvar doom--file-name-handler-alist file-name-handler-alist)
|
2018-06-15 14:10:06 +02:00
|
|
|
|
2018-08-31 23:40:54 +02:00
|
|
|
(unless after-init-time
|
|
|
|
;; A big contributor to long startup times is the garbage collector, so we
|
|
|
|
;; up its memory threshold, temporarily and reset it later in
|
|
|
|
;; `doom|finalize'.
|
|
|
|
(setq gc-cons-threshold 402653184
|
|
|
|
gc-cons-percentage 1.0
|
|
|
|
;; consulted on every `require', `load' and various file reading
|
|
|
|
;; functions. You get a minor speed up by nooping this.
|
|
|
|
file-name-handler-alist nil))
|
|
|
|
|
|
|
|
(defun doom|finalize ()
|
|
|
|
"Resets garbage collection settings to reasonable defaults (if you don't do
|
|
|
|
this, you'll get stuttering and random freezes) and resets
|
|
|
|
`file-name-handler-alist'."
|
|
|
|
(setq file-name-handler-alist doom--file-name-handler-alist
|
|
|
|
gc-cons-threshold 16777216
|
|
|
|
gc-cons-percentage 0.15))
|
|
|
|
|
|
|
|
(add-hook 'emacs-startup-hook #'doom|finalize)
|
|
|
|
(add-hook 'doom-reload-hook #'doom|finalize)
|
2018-08-25 23:49:30 +02:00
|
|
|
|
2018-08-31 23:40:54 +02:00
|
|
|
;; Ensure Doom is always running out of this file's directory
|
|
|
|
(setq user-emacs-directory (file-name-directory load-file-name)
|
|
|
|
;; In noninteractive sessions, we hope that non-byte-compiled files will
|
|
|
|
;; take precedence over byte-compiled ones, however, if you're getting odd
|
|
|
|
;; recursive load errors, it may help to set this to nil.
|
|
|
|
load-prefer-newer noninteractive)
|
|
|
|
|
|
|
|
;; Let 'er rip!
|
|
|
|
(require 'core (concat user-emacs-directory "core/core"))
|