-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
66 lines (55 loc) · 2.01 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
;;; init --- Iniitialisation file for cask based
;;; Code:
;; Enable a backtrace when problems occur
(setq debug-on-error t)
(setq emacs-config-dir (file-name-directory
(or (buffer-file-name) load-file-name)))
;;; Require and execute cask
(require 'cask (let ((linux-path "~/.cask/cask.el")
(osx-path "/usr/local/share/emacs/site-lisp/cask/cask.el"))
(cond ((file-exists-p linux-path) linux-path)
((file-exists-p osx-path) osx-path))))
(cask-initialize emacs-config-dir)
;;; Initialize packages
(defconst *emacs-config-dir* (concat emacs-config-dir "configs/" ""))
(defconst *emacs-custom-dir* (concat emacs-config-dir "custom/" ""))
;; A function to load config files
(defun load-config-files (config files)
(dolist (f files)
(load (expand-file-name
(concat config f)))
;;(message "Loaded config file: %s" f)
))
;;; Set the proper shell before doing anything else
(when (eq system-type 'darwin)
(require 'exec-path-from-shell)
(exec-path-from-shell-initialize))
;; Set proper color theme
(load-theme 'sanityinc-tomorrow-night t)
(load-config-files *emacs-config-dir*
'("nyan-mode"
"ido-mode"
"ido-vertical-mode"
"cider"
"company"
"ensime"
"popwin"
"projectile"
"rainbow-delimiters"
"ruby-mode"
"rvm"
"smooth-scrolling"
"yas-snippet"
"neotree"
))
(load-config-files *emacs-custom-dir*
'("generics"
"functions"
"starter-kit-defuns"
"osx"
"x60"
"key-bindings"))
(message "Setup is done, happy hacking!")
;;; init.el ends here
(put 'upcase-region 'disabled nil)
(put 'scroll-left 'disabled nil)