-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.el
151 lines (118 loc) · 3.58 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
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
;;; init.el --- Alex Bennée's .emacs
;;
;;; Commentary:
;;
;; This is my Emacs, there are many like it but this is my own.
;; It is mainly an amalgem of different hacks acquired over time
;; which I use on many of the machines I work with.
;;
;; It has a cobbled heritage from various sites and wikis and it is
;; probably safest to assume the code is all either GPL or Public
;; Domain. Feel free to use whatever bits may be of use to you in these
;; files that it is my right to license ;-)
;;
;;; Code:
; debugging weird start-up issues.
;; (setq debug-ignored-errors (remq 'user-error debug-ignored-errors))
;; (setq debug-on-error t)
;; Use .el if it is newer
(when (boundp 'load-prefer-newer)
(setq load-prefer-newer t))
;; Manually load this (as paths not yet set)
(declare-function my-add-config-paths "~/.emacs.d/my-elisp/my-paths" t t)
(when (load-library "~/.emacs.d/my-elisp/my-paths")
(my-add-config-paths))
;;;; Start of real code.
;; Find out about my environment
(require 'my-vars)
;; For auto-testing
(defvar I-completed-loading-dotinit 'nil
"Flag indicating succesful start-up.")
;; Load the initial packaging setup.
;; This will bring in use-package for us.
;; (package-initialize) is called in here.
(load-library "my-package.el")
;; Add ~/.emacs.d/*.git project into search path
;; They are added in-front of all other paths so will override
;; ELPA/MELPA versions
(when (fboundp 'my-add-git-project-paths)
(my-add-git-project-paths))
(use-package my-config)
(use-package my-keybinds)
(use-package my-libs)
(use-package my-basic-modes)
;; Load any hand-made customisation
;; we do this early to prevent problems with theme safety and the like
(when (file-exists-p custom-file)
(load custom-file))
(use-package my-display)
(use-package my-modeline)
;; We only need one edit-server at a time really
(use-package my-web)
(when (or (and (getenv "DISPLAY") (daemonp) (not I-am-root))
I-am-on-pixelbook)
(message "Setting up edit-servers")
(use-package my-atomic-chrome)
(use-package my-edit-server))
;; Stuff I always want
;; general editing
(use-package my-editing)
(use-package my-hydra)
;; email
(use-package my-email
:if (and (file-accessible-directory-p "~/Maildir")
(not I-am-root)))
;; gnus for backup
(use-package my-gnus
:if (not I-am-root))
;; Development related stuff
(use-package my-devel)
(use-package my-assistants)
(use-package my-text)
(use-package my-flycheck
:if (version<= "24.4" emacs-version))
(use-package my-elisp)
(use-package my-python)
;; Org configuration
(use-package my-org
:if (not I-am-root))
;; Helm
(use-package my-helm
:disabled t)
;; More keybindings
(use-package my-toggles)
;; Window and buffer navigation
(use-package my-windows)
(use-package my-buffer)
(use-package my-dired)
(use-package my-keyhelp)
;; Locally installed pkgs
(use-package my-local-pkgs)
;; Useful modes
; currently considering corfu over company but only if I can get it to
; work properly with LSP mode.
;; (use-package my-company
;; :disabled t)
(use-package my-corfu)
(use-package my-yasnippet)
;; other customisations
(use-package my-tramp)
(use-package my-spell)
(use-package my-gpg)
(use-package my-git
:if (version<= "25.1" emacs-version))
(use-package my-htmlize)
(use-package my-eshell)
(use-package my-circe
:if (not I-am-root))
(use-package my-matrix
:if I-am-at-work)
(use-package my-diff)
(use-package my-elfeed)
(use-package my-transmission
:if (string-match "seed" (system-name)))
;; Finished loading
(setq I-completed-loading-dotinit 't)
(message "Done .emacs (%d gcs in %f)" gcs-done gc-elapsed)
(provide 'init)
;;; init.el ends here