forked from Wojtek242/.emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
159 lines (121 loc) · 6.08 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
;;; init.el --- Emacs Initialization File
;;
;; Copyright (c) 2017 Wojciech Kozlowski
;;
;; Author: Wojciech Kozlowski <[email protected]>
;; URL: https://gitlab.wojciechkozlowski.eu/config/emacs.d
;; URL: https://github.com/Wojtek242/.emacs.d
;; Created: 17 Aug 2017
;;
;;; License: GPLv3
;;; Commentary:
;;; Code:
;; ----------------------------------------------------------------------------
;; Run init without garbage collection.
;; ----------------------------------------------------------------------------
(let ((gc-cons-threshold most-positive-fixnum))
;; --------------------------------------------------------------------------
;; Initialise and setup `package'.
;; --------------------------------------------------------------------------
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
;; Local copies of packages no longer provided by MELPA. See
;; https://github.com/melpa/melpa/pull/5008.
(add-to-list 'load-path "~/.emacs.d/emacswiki/")
;; --------------------------------------------------------------------------
;; Load `emodule'.
;; --------------------------------------------------------------------------
(add-to-list 'load-path "~/.emacs.d/emodule")
(require 'emodule)
;; --------------------------------------------------------------------------
;; Visual configuration.
;; --------------------------------------------------------------------------
;; Font ---------------------------------------------------------------------
(let* ((font-name "Source Code Pro")
(font-size 10)
(font-spec (concat font-name "-" (int-to-string font-size))))
(set-frame-font font-spec nil t)
(add-to-list 'default-frame-alist `(font . ,font-spec))
(set-face-attribute 'italic nil ;; Emacs does not set italic face
:family (concat font-name "-Italic")))
;; Fullscreen ---------------------------------------------------------------
(toggle-frame-maximized)
(add-to-list 'default-frame-alist '(fullscreen . maximized))
;; Visual clutter -----------------------------------------------------------
(scroll-bar-mode -1)
(tool-bar-mode -1)
(menu-bar-mode -1)
(blink-cursor-mode -1)
;; Theme --------------------------------------------------------------------
;; Add the necessary paths.
(add-to-list 'load-path "~/.emacs.d/themes/")
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
;; Load the dark theme by default.
(load-theme 'havoc-dark t) ;; Load personal theme
;; Splash screen ------------------------------------------------------------
;; Add path.
(add-to-list 'load-path "~/.emacs.d/initial-buffer")
(require 'initial-buffer)
;; Set the initial buffer.
(setq initial-buffer-choice 'initial-buffer/goto-buffer)
;; --------------------------------------------------------------------------
;; Change file in which custom variable changes are saved.
;; --------------------------------------------------------------------------
(setq-default custom-file "~/.emacs.d/custom.el")
;; *********************************************************************** ;;
;; ;;
;; MODULES ;;
;; ;;
;; ----------------------------------------------------------------------- ;;
;; ;;
;; ;;
;; Visual configuration must come before this point so that the frame can ;;
;; be set up before any time consuming package management. ;;
;; ;;
;; ;;
;; *********************************************************************** ;;
;; --------------------------------------------------------------------------
;; Load modules.
;; --------------------------------------------------------------------------
(emodule/init '(
em-editing
em-emacs
em-files
em-helm
em-modeline
em-org
em-parentheses
em-programming
em-terminal
em-version-control
em-workflow
))
;; *********************************************************************** ;;
;; ;;
;; ;;
;; Any configuration that is not in a module or needs to override module ;;
;; settings should be set below this point. ;;
;; ;;
;; ;;
;; ----------------------------------------------------------------------- ;;
;; ;;
;; END MODULES ;;
;; ;;
;; *********************************************************************** ;;
;; Add path.
(add-to-list 'load-path "~/.emacs.d/ide-mode")
(require 'ide-mode)
(require 'ide-mode-config)
(setq ide-mode/term-default (lambda () (ansi-term "zsh")))
(define-key ide-mode-map (kbd "M-i") 'ide-mode/select-term-window)
(ide-mode)
(ide-mode/start)
;; --------------------------------------------------------------------------
;; Load any custom variables.
;; --------------------------------------------------------------------------
(load custom-file 'noerror)
) ;; Reset garbage collection settings.
(provide 'init)
;;; init.el ends here