-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.el
54 lines (37 loc) · 1.54 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
;;; Emacs init file
;; Author: Vineet Naik <[email protected]>
;; globally set various paths
(setq my/emacs-config-dir (expand-file-name "~/emacs/site")
my/vendor-lib-dir (expand-file-name "lib" my/emacs-config-dir)
my/self-lib-dir (expand-file-name "naiquevin" my/emacs-config-dir)
my/config-dir (expand-file-name "config" my/emacs-config-dir)
my/elpa-dir (expand-file-name "elpa" user-emacs-directory)
my/themes-dir (expand-file-name "themes" my/emacs-config-dir)
my/priv-dir (expand-file-name "priv" my/emacs-config-dir)
custom-file (expand-file-name "custom.el" my/emacs-config-dir))
;; Add dirs to load-path
(add-to-list 'load-path my/emacs-config-dir)
(add-to-list 'load-path my/vendor-lib-dir)
(add-to-list 'load-path my/self-lib-dir)
;; pkg-init initializes default package management mechanism (ELPA)
;; and ensures at startup that all required packages are installed
;; (stolen from emacs-prelude)
(require 'pkg-init)
;; Load an elisp file having self written utilities so that they may
;; be used in config files later
(require 'defuns)
;; Pre-config - Following lines need to be evaluated before config
;; files are loaded
(use-package load-dir
:ensure t
:init (setq load-dirs (list my/config-dir)))
;; platform specific config
(cond ((eq system-type 'darwin) (require 'osx))
((eq system-type 'windows-nt) (require 'win))
(t (require 'linux)))
;; Load the custom file
(load custom-file)
;; Start Server if it's not running
(require 'server)
(when (not (server-running-p))
(server-start))