This repository has been archived by the owner on Feb 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinit.el
139 lines (109 loc) · 3.43 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
;;; init.el --- Configuration for Emacs
;;
;;; Commentary:
;;
;; Configuration for Emacs
;;
;;; Code:
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
;;(setq package-enable-at-startup nil)
(package-initialize)
;; Recompile .el file(s) if changes occur
;; (byte-recompile-directory (expand-file-name "~/.emacs.d/kiran") 0)
;; Prevent loading of outdated .elc files
;; (setq load-prefer-newer t)
;; Record the start time
(setq *emacs-load-start* (current-time))
;; Experiment: Turn off mouse interface early in startup to avoid momentary display
(menu-bar-mode -1)
(scroll-bar-mode -1)
;; Cache 50MB before garbage collection
(setq gc-cons-threshold 50000000)
;; language
(setq current-language-environment "English")
;; Changes all yes/no questions to y/n type
(fset 'yes-or-no-p 'y-or-n-p)
(setq confirm-kill-emacs #'y-or-n-p)
;; Turn off bell
(setq ring-bell-function #'ignore)
;; https://www.emacswiki.org/emacs/ExecPath
(add-to-list 'exec-path "/usr/local/bin")
(add-to-list 'load-path "~/.emacs.d/kiran/")
(package-initialize)
(require 'init-packages)
;; On OS X Emacs doesn't use the shell PATH if it's not started from
;; the shell. Let's fix that:
(use-package exec-path-from-shell
:if (memq window-system '(mac ns))
:ensure t
:config (exec-path-from-shell-initialize))
;; Custom configuration set by Emacs
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file 'noerror)
(require 'init-ui)
(require 'init-editing)
(require 'init-dired)
(require 'init-kbd)
(require 'init-smex)
(require 'init-ivy)
(require 'init-ibuffer)
(require 'init-company)
(require 'init-keychord)
(require 'init-parens)
(require 'init-search)
(require 'init-python)
(require 'init-clojure)
(require 'init-elisp)
(require 'init-elixir)
(require 'init-org)
(require 'init-yasnippet)
(require 'init-modeline)
(require 'init-shell)
(require 'init-magit)
(require 'init-projectile)
(require 'init-docker)
(require 'init-web)
(require 'init-efuns)
(require 'init-experimental)
(use-package gruvbox-theme
:ensure t
:config
(load-theme 'gruvbox-dark-medium))
(set-face-attribute 'region nil :background "#3a3a3a")
(fringe-mode 10)
;; Save minibuffer history
(setq savehist-file "~/.emacs.d/savehist")
(savehist-mode 1)
(setq history-length 150)
(setq history-delete-duplicates t)
(setq savehist-save-minibuffer-history 1)
;; turn beep off
(setq visible-bell nil)
;; Follow compiler ouput
(setq compilation-scroll-output t)
(remove-hook 'org-mode-hook 'linum-mode)
(remove-hook 'compilation-minor-mode-hook 'linum-mode)
(remove-hook 'custom-theme-choose-mode-hook 'linum-mode)
;; don't disable narrow-to-region command
(put 'narrow-to-region 'disabled nil)
(use-package discover-my-major
:ensure t)
;; Start emacs server
(server-start)
;; Write out a message indicating how long it took to process the init script
(require 'cl)
(message "init.el loaded in %ds"
(destructuring-bind (hi lo ms ps) (current-time)
(- (+ hi lo)
(+ (first *emacs-load-start*)
(second *emacs-load-start*)))))
(provide `.emacs)
;;; init.el ends here
;; ======= TODOs ===========
;; - Checkout stuff in https://github.com/bbatsov/crux
;; - https://github.com/abo-abo/hydra
;; - https://github.com/kiwanami/emacs-calfw
;; - https://github.com/ilya-babanov/emacs-bpr