forked from jkitchin/scimax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
65 lines (46 loc) · 1.69 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
;;; init.el --- Where all the magic begins
;;
;;; Commentary:
;;
;; This is a starter kit for scimax. This package provides a
;; customized setup for emacs that we use daily for scientific
;; programming and publication.
;;
;;; Code:
;; this makes garbage collection less frequent, which speeds up init by about 2 seconds.
(setq gc-cons-threshold 80000000)
(when (version< emacs-version "25.0")
(warn "You probably need at least Emacs 25. You should upgrade. You may need to install leuven-theme manually."))
;; remember this directory
(defconst scimax-dir (file-name-directory (or load-file-name (buffer-file-name)))
"Directory where the scimax is installed.")
(defvar scimax-user-dir (expand-file-name "user" scimax-dir)
"User directory for personal code.")
(setq user-emacs-directory scimax-user-dir)
(setq package-user-dir (expand-file-name "elpa" scimax-dir))
;; we load the user/preload.el file if it exists. This lets users define
;; variables that might affect packages when they are loaded, e.g. key-bindings,
;; etc... setup autoupdate, .
(let ((preload (expand-file-name "user/preload.el" scimax-dir)))
(when (file-exists-p preload)
(load preload)))
(defvar scimax-load-user-dir t
"Controls if the user directory is loaded.")
(require 'package)
(add-to-list
'package-archives
'("melpa" . "http://melpa.org/packages/")
t)
(add-to-list
'package-archives
'("org" . "http://orgmode.org/elpa/")
t)
(add-to-list 'load-path scimax-dir)
(add-to-list 'load-path scimax-user-dir)
(let ((default-directory scimax-dir))
(shell-command "git submodule update --init"))
(set-language-environment "UTF-8")
(require 'bootstrap)
(require 'packages)
(provide 'init)
;;; init.el ends here