-
Notifications
You must be signed in to change notification settings - Fork 30
/
init.el
70 lines (53 loc) · 2.12 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
;;; init.el --- GNU/Emacs FTW!
(load-file (expand-file-name "utils.el" user-emacs-directory))
(defvar bg--local-dir (expand-file-name ".local/" user-emacs-directory) "The directory for package repo, etc.")
(defvar bg--save-dir (expand-file-name "save/" bg--local-dir) "The directory for savefiles.")
(defvar bg--conf-dir (expand-file-name "conf" user-emacs-directory) "The directory for config files.")
;; initialise straight.el
(setf straight-base-dir (expand-file-name "var/" bg--local-dir))
(setf straight-repository-branch "develop")
;; some settings to make straight.el even better
(setq straight-use-package-by-default t
use-package-always-defer t
straight-cache-autoloads t
straight-vc-git-default-clone-depth 1
vc-follow-symlinks t
straight-check-for-modifications '(check-on-save find-when-checking)
straight-recipes-emacsmirror-use-mirror nil)
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" straight-base-dir))
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(setq vc-follow-symlinks 'ask) ; restore default
;; install use-package
(straight-use-package 'use-package)
(require 'use-package)
(setq use-package-verbose t)
;; GC Hack
(use-package gcmh
:straight t
:demand t
:config
(gcmh-mode 1))
;; load other settings files
(bg/maybe-load "settings.el")
(when (memq system-type '(darwin)) (bg/maybe-load "osx.el"))
(bg/maybe-load "core.el")
(bg/maybe-load "themes.el")
(bg/maybe-load "dev.el")
(bg/maybe-load "clojure.el")
(bg/maybe-load "utils.el")
(bg/maybe-load "org-config.el")
(add-hook 'emacs-startup-hook #'bg/display-startup-msg)
(add-hook 'emacs-startup-hook (lambda ()
(when (display-graphic-p)
(ar/show-welcome-buffer))))
;;; init.el ends here