-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathinit.el
61 lines (50 loc) · 2.17 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
(package-initialize)
(defconst +home-dir+ "~")
(defconst +emacs-dir+ (concat +home-dir+ "/emacs"))
(defconst +emacs-profiles-dir+ (concat +emacs-dir+ "/profiles"))
(defconst +emacs-lib-dir+ (concat +emacs-dir+ "/libs"))
(defconst +emacs-conf-dir+ (concat +emacs-dir+ "/config"))
(defconst +emacs-tmp-dir+ (concat +emacs-dir+ "/tmp"))
(defconst +emacs-snippets-dir+ (concat +emacs-dir+ "/snippets"))
;; new projects will be created under this directory
(defconst +dev-dir+ (concat +home-dir+ "/dev"))
(defun add-load-path (p)
(add-to-list 'load-path (concat +emacs-dir+ "/" p)))
(defun add-lib-path (p)
(add-to-list 'load-path (concat +emacs-lib-dir+ "/" p)))
(defun load-conf-file (f)
(load-file (concat +emacs-conf-dir+ "/" f ".el")))
(defun load-lib-file (f)
(load-file (concat +emacs-lib-dir+ "/" f)))
(defun load-profile (p)
(load-file (concat +emacs-profiles-dir+ "/" p ".el")))
(defun load-customizations ()
(let ((filename (concat +emacs-dir+ "/custom.el")))
(if (file-readable-p filename)
(load-file filename))))
(add-load-path "")
(add-load-path "lib")
(load-profile "default")
(load-profile "js")
;;(load-profile "coffee")
(load-profile "golang")
;;(load-profile "clojure")
(load-customizations)
;;(add-to-list 'command-switch-alist '("clojure" . (lambda (n) (load-profile "clojure"))))
;;(add-to-list 'command-switch-alist '("ruby" . (lambda (n) (load-profile "ruby"))))
;;(add-to-list 'command-switch-alist '("android" . (lambda (n) (load-profile "android"))))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes
(quote
("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "a8245b7cc985a0610d71f9852e9f2767ad1b852c2bdea6f4aadc12cce9c4d6d0" default)))
'(js2-strict-inconsistent-return-warning nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)