forked from a-schaefers/spartan-emacs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
81 lines (63 loc) · 2.43 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
;;; -*- lexical-binding: t; no-byte-compile: t; -*-
;; configuration -- uncomment desired layers => C-x C-s => M-x spartan-reconfigure
(setq spartan-layers '(spartan-startup
spartan-performance
spartan-better-defaults
spartan-binds-global
spartan-environment
spartan-theme
spartan-elpa-melpa ; required by layers below
spartan-ido
spartan-flymake
;; spartan-projectile
spartan-evil
spartan-kill-ring
spartan-crux
spartan-webpaste
spartan-shell
;; spartan-emacs-nw
spartan-vterm
spartan-magit
spartan-eglot
spartan-lisp
;; spartan-c
spartan-python
spartan-terraform
;; spartan-nix
spartan-nginx
;; spartan-systemd
spartan-json
spartan-yaml
spartan-xml
spartan-javascript
;; spartan-ruby
;; spartan-rust
spartan-go
;; spartan-solidity
spartan-custom
))
;; spartan-layers
(add-to-list 'load-path (concat user-emacs-directory "spartan-layers"))
(dolist (layer spartan-layers)
(require layer))
;; install third party packages
(with-eval-after-load 'spartan-elpa-melpa
(spartan-package-bootstrap))
;; M-x customize
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(when (file-exists-p custom-file)
(load-file custom-file))
;; spartan.d/
(setq spartan-lisp-d (concat user-emacs-directory "spartan.d"))
(defun spartan-user-local-hook ()
(when (file-directory-p spartan-lisp-d)
(dolist (file (directory-files spartan-lisp-d nil "^.*\.el$"))
(load-file (concat spartan-lisp-d "/" file)))))
(add-hook 'emacs-startup-hook 'spartan-user-local-hook)
;; M-x spartan-reconfigure
(defun spartan-reconfigure ()
(interactive)
(load-file user-init-file)
(run-hooks 'after-init-hook
'emacs-startup-hook))
;;; init.el ends here