-
Notifications
You must be signed in to change notification settings - Fork 9
/
init.el
48 lines (39 loc) · 1.65 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
(setq ns-use-srgb-colorspace nil)
;; Remove the UI
(dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode))
(when (fboundp mode) (funcall mode -1)))
(setq inhibit-startup-message t)
(set-fringe-mode '(1 . 1))
(setq use-dialog-box nil)
;; Disable spell check
(setq-default spell-checking-enable-by-default nil)
;; Setup the package management
(require 'package)
(setq package-enable-at-startup nil)
(setq package-user-dir "~/.emacs.d/elpa/")
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/") t)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
(setq package-check-signature nil)
;; Bootstrap 'use-package'
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
(use-package exec-path-from-shell :ensure t
:init (exec-path-from-shell-initialize))
(use-package gnu-elpa-keyring-update :ensure t)
;; Load the configuration
(let ((custom-file (expand-file-name "emacs-custom.el" user-emacs-directory))
(user-config-file (expand-file-name (concat user-login-name ".el") user-emacs-directory)))
(when (file-exists-p custom-file) (load custom-file))
(dolist (dir (list "lisp" "config" user-login-name))
(let ((config-dir (expand-file-name dir user-emacs-directory)))
(when (file-exists-p config-dir)
(add-to-list 'load-path config-dir)
(mapc 'load (directory-files config-dir nil "^[^#].*el$")))))
(when (file-exists-p user-config-file) (load user-config-file)))
;; Run the emacs server
(use-package server
:if window-system
:init (add-hook 'after-init-hook 'server-start t))