/
init.el
executable file
·170 lines (144 loc) · 6.64 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
;; Make startup faster by reducing the frequency of garbage
;; collection. The default is 800 kilobytes. Measured in bytes.
(setq gc-cons-threshold (* 50 1000 1000))
;; (toggle-debug-on-error)
(setq aj/time (current-time))
(defun profile-package (package)
""
(message "%s: after loading package %s, with %d garbage collections."
(format "%.2f seconds"
(float-time
(time-subtract (current-time) aj/time)))
package
gcs-done)
(setq aj/time (current-time)))
(add-to-list 'load-path "~/.emacs.d/lisp")
(add-to-list 'load-path "~/.emacs.d/lisp/vendor")
;; sets up package, use-package and repositories
(require 'arvid-package) (profile-package "arvid-package")
(require 'arvid-lib) (profile-package "'arvid-lib")
(require 'arvid-misc) (profile-package "'arvid-misc")
;;;;;;;;;;;;;;;;;;;;;;
;; Misc. defuns
(require 'arvid-func) (profile-package "'arvid-func")
;;;;;;;;;;;;;;;;;;;;;;
;; Move backup and autosave files.
(require 'arvid-backup-autosave) (profile-package "'arvid-backup-autosave")
(require 'arvid-recentf) (profile-package "'arvid-recentf") ; For opening recently opened files
(require 'arvid-editserver) (profile-package "'arvid-editserver")
;; Generalities for programming
(require 'arvid-flycheck) (profile-package "'arvid-flycheck")
(require 'arvid-company) (profile-package "'arvid-company")
;; Programming, etc
(require 'arvid-haskell) (profile-package "'arvid-haskell")
(require 'arvid-coq) (profile-package "'arvid-coq")
(require 'arvid-lisp) (profile-package "'arvid-lisp")
;; (require 'arvid-python) (profile-package "'arvid-python")
(require 'arvid-css) (profile-package "'arvid-css")
(electric-pair-mode)
;; (require 'arvid-c) (profile-package "'arvid-c")
;; (require 'arvid-sgml) (profile-package "'arvid-sgml")
(require 'arvid-sh) (profile-package "'arvid-sh")
(require 'arvid-yaml) (profile-package "'arvid-yaml")
(require 'arvid-ocaml) (profile-package "'arvid-ocaml")
(require 'arvid-cram) (profile-package "'cram-mode")
;; (require 'arvid-michelson) (profile-package "'arvid-michelson")
(require 'arvid-ligo) (profile-package "'arvid-ligo")
(require 'arvid-docker) (profile-package "'arvid-docker")
(require 'arvid-typescript) (profile-package "'arvid-typescript")
(require 'arvid-sql) (profile-package "'arvid-sql")
(require 'arvid-nix) (profile-package "'arvid-nix")
(require 'arvid-compile) (profile-package "'arvid-compile")
;; Nomadic Labs specific
(require 'arvid-nomadic-labs) (profile-package "'arvid-nomadic-labs")
;;;;;;;;;;;;;;;;;;;;;;
;; Keybindings
(require 'arvid-keys) (profile-package "'arvid-keys")
;; (require 'arvid-bashmarks) (profile-package "'arvid-bashmarks")
;;;;;;;;;;;;;;;;;;;;;;
;; Interface
(require 'arvid-gui) (profile-package "'arvid-gui")
(require 'arvid-windows) (profile-package "'arvid-windows")
;; (require 'fill-column-indicator) (profile-package "'fill-column-indicator")
;; (setq fci-style 'rule)
;;;;;;;;;;;;;;;;;;;;;;
;; Misc. modes
(load "server") ; https://stackoverflow.com/questions/5570451/how-to-start-emacs-server-only-if-it-is-not-started
(unless (server-running-p) (server-start))
(require 'arvid-org-mode) (profile-package "'arvid-org-mode")
(require 'arvid-org-clock) (profile-package "'arvid-org-clock")
(require 'arvid-org-present) (profile-package "'arvid-org-present")
(require 'arvid-yasnippet) (profile-package "'arvid-yasnippet")
(require 'arvid-gitlab) (profile-package "'arvid-gitlab")
(require 'arvid-gitlab-ci) (profile-package "'arvid-gitlab-ci")
(require 'arvid-projectile) (profile-package "'arvid-projectile")
(require 'arvid-ido) (profile-package "'arvid-ido")
(require 'arvid-helm) (profile-package "'arvid-helm")
(require 'arvid-magit) (profile-package "'arvid-magit")
(use-package browse-at-remote :ensure t)
(require 'arvid-smerge) (profile-package "'arvid-smerge")
(require 'arvid-ibuffer) (profile-package "'arvid-ibuffer")
(require 'arvid-iedit) (profile-package "'arvid-iedit")
(require 'arvid-uniquify) (profile-package "'arvid-uniquify")
(use-package browse-kill-ring :ensure t)
(require 'arvid-dired) (profile-package "'arvid-dired")
;; (require 'arvid-vterm) (profile-package "'arvid-vterm")
(require 'arvid-shell) (profile-package "'arvid-shell")
(require 'arvid-tramp) (profile-package "'arvid-tramp")
;; Must load after org-mode
(require 'arvid-ott) (profile-package "'arvid-ott")
(require 'rejeep-comment) (profile-package "'rejeep-comment")
(require 'arvid-diff) (profile-package "'arvid-diff")
(require 'arvid-drag-stuff) (profile-package "'arvid-drag-stuff")
(require 'arvid-conf) (profile-package "'arvid-conf")
(require 'arvid-ws-butler) (profile-package "'arvid-ws-butler")
(require 'arvid-flyspell) (profile-package "'arvid-flyspell")
(require 'arvid-calendar) (profile-package "'arvid-calendar")
(use-package expand-region
:ensure t
:bind ("M-9" . 'er/expand-region))
(require 'arvid-multiple-cursors) (profile-package "'arvid-multiple-cursors")
(require 'arvid-dir-vars) (profile-package "'arvid-dir-vars")
(require 'arvid-markdown) (profile-package "'arvid-markdown")
(require 'arvid-latex) (profile-package "'arvid-latex")
(require 'arvid-rst) (profile-package "'arvid-rst")
(require 'arvid-bashmarks) (profile-package "'arvid-bashmarks")
(require 'arvid-auto-insert) (profile-package "'arvid-auto-insert")
(require 'arvid-ffap) (profile-package "'arvid-ffap")
;;;;;;;;;;;;;;;;;;;;;;
;; Encodings
;; (require 'arvid-encodings) (profile-package "'arvid-encodings")
;;;;;;;;;;;;;;;;;;;;;;
;; Customization
(require 'arvid-custom) (profile-package "'arvid-custom")
;;;;;;;;;;;;;;;;;;;;;;
;; Activate functions
(put 'set-goal-column 'disabled nil)
(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)
(put 'dired-find-alternate-file 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'LaTeX-narrow-to-environment 'disabled nil)
(put 'narrow-to-page 'disabled nil)
(put 'scroll-left 'disabled nil)
;; Start up time
;; 1. before any changes: 6.3s
;;
;; Use a hook so the message doesn't get clobbered by other messages.
(add-hook 'emacs-startup-hook
(lambda ()
(message "Emacs ready in %s with %d garbage collections."
(format "%.2f seconds"
(float-time
(time-subtract after-init-time before-init-time)))
gcs-done)))
;; Make gc pauses faster by decreasing the threshold.
(setq gc-cons-threshold (* 2 1000 1000))
;; Used in i3 to make sure that Emacs communicates with the keychain
;; program to automatically unlock ssh keys.
(use-package keychain-environment
:ensure t
:config
(keychain-refresh-environment))
;; 2. after GC change: Emacs ready in 4.50 seconds with 18 garbage collections
(put 'magit-clean 'disabled nil)