commit | author | age
|
5cb5f7
|
1 |
(provide 'init) |
C |
2 |
|
|
3 |
;; set paths for executable |
|
4 |
(add-to-list 'exec-path "C:/msys64/usr/bin") |
|
5 |
(add-to-list 'exec-path "C:/msys64/mingw64/bin") |
707431
|
6 |
(add-to-list 'exec-path "c:/Program Files/Racket") |
5cb5f7
|
7 |
(setenv "PATH" (mapconcat #'identity exec-path path-separator)) |
C |
8 |
|
|
9 |
;; adding modules to load path |
|
10 |
(add-to-list 'load-path "~/.emacs.d/custom/") |
707431
|
11 |
(add-to-list 'load-path "~/.emacs.d/elpa/") |
5cb5f7
|
12 |
|
C |
13 |
;; load your modules |
|
14 |
(require 'setup-applications) |
|
15 |
(require 'setup-communication) |
|
16 |
(require 'setup-convenience) |
|
17 |
(require 'setup-data) |
|
18 |
(require 'setup-development) |
|
19 |
(require 'setup-editing) |
|
20 |
(require 'setup-environment) |
|
21 |
(require 'setup-external) |
|
22 |
(require 'setup-faces) |
|
23 |
(require 'setup-files) |
|
24 |
(require 'setup-help) |
|
25 |
(require 'setup-programming) |
|
26 |
(require 'setup-text) |
|
27 |
(require 'setup-local) |
|
28 |
|
|
29 |
;; setting up aspell |
|
30 |
(require 'ispell) |
|
31 |
(setq-default ispell-program-name "aspell") |
|
32 |
|
a4b917
|
33 |
;; Repos |
5cb5f7
|
34 |
(require 'package) |
a4b917
|
35 |
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) |
e75a20
|
36 |
;; (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) |
a4b917
|
37 |
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")) |
C |
38 |
|
|
39 |
;; use-package |
5cb5f7
|
40 |
(package-initialize) |
a4b917
|
41 |
(unless (package-installed-p 'use-package) |
C |
42 |
(package-refresh-contents) |
|
43 |
(package-install 'use-package)) |
|
44 |
|
|
45 |
(eval-when-compile |
|
46 |
(require 'use-package)) |
|
47 |
|
5cb5f7
|
48 |
|
707431
|
49 |
;; auto-package-update |
C |
50 |
(use-package auto-package-update |
|
51 |
:config |
e75a20
|
52 |
(setq auto-package-update-delete-old-versions t) |
C |
53 |
(setq auto-package-update-hide-results t) |
|
54 |
(auto-package-update-maybe)) |
|
55 |
|
|
56 |
;; zenburn theme |
|
57 |
(use-package zenburn-theme |
|
58 |
:ensure t |
|
59 |
:config |
|
60 |
(load-theme 'zenburn) |
707431
|
61 |
(setq auto-package-update-delete-old-versions t) |
C |
62 |
(setq auto-package-update-hide-results t) |
|
63 |
(auto-package-update-maybe)) |
|
64 |
|
5cb5f7
|
65 |
;; helm |
707431
|
66 |
(use-package helm-config |
C |
67 |
:ensure helm |
|
68 |
:bind (("M-x" . helm-M-x) |
|
69 |
("C-x C-f" . helm-find-files) |
|
70 |
("M-y" . helm-show-kill-ring) |
|
71 |
("C-x b" . helm-mini) |
|
72 |
("C-c h o" . helm-occur)) |
|
73 |
:config |
|
74 |
(setq helm-M-x-fuzzy-match t) |
|
75 |
(setq helm-buffers-fuzzy-matching t |
|
76 |
helm-recentf-fuzzy-match t) |
|
77 |
(setq helm-split-window-in-side-p t ; open helm buffer inside current window, not occupy whole other window |
|
78 |
helm-move-to-line-cycle-in-source t ; move to end or beginning of source when reaching top or bottom of source. |
|
79 |
helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp. |
|
80 |
helm-scroll-amount 8 ; scroll 8 lines other window using M-<next>/M-<prior> |
|
81 |
helm-ff-file-name-history-use-recentf t |
|
82 |
helm-echo-input-in-header-line t) |
|
83 |
(defun spacemacs//helm-hide-minibuffer-maybe () |
|
84 |
"Hide minibuffer in Helm session if we use the header line as input field." |
|
85 |
(when (with-helm-buffer helm-echo-input-in-header-line) |
|
86 |
(let ((ov (make-overlay (point-min) (point-max) nil nil t))) |
|
87 |
(overlay-put ov 'window (selected-window)) |
|
88 |
(overlay-put ov 'face |
|
89 |
(let ((bg-color (face-background 'default nil))) |
|
90 |
`(:background ,bg-color :foreground ,bg-color))) |
|
91 |
(setq-local cursor-type nil)))) |
|
92 |
(add-hook 'helm-minibuffer-set-up-hook |
|
93 |
'spacemacs//helm-hide-minibuffer-maybe) |
|
94 |
(helm-mode 1) |
|
95 |
(setq auto-package-update-delete-old-versions t) |
|
96 |
(setq auto-package-update-hide-results t) |
|
97 |
(auto-package-update-maybe)) |
5cb5f7
|
98 |
|
9d27fc
|
99 |
;; undo-tree |
707431
|
100 |
(use-package undo-tree |
C |
101 |
:ensure t |
|
102 |
:config |
|
103 |
(global-undo-tree-mode) |
|
104 |
(setq auto-package-update-delete-old-versions t) |
|
105 |
(setq auto-package-update-hide-results t) |
|
106 |
(auto-package-update-maybe)) |
5cb5f7
|
107 |
|
9d27fc
|
108 |
;; volatile highlights |
707431
|
109 |
(use-package volatile-highlights |
C |
110 |
:ensure t |
|
111 |
:config |
|
112 |
(volatile-highlights-mode t) |
|
113 |
(setq auto-package-update-delete-old-versions t) |
|
114 |
(setq auto-package-update-hide-results t) |
|
115 |
(auto-package-update-maybe)) |
5cb5f7
|
116 |
|
9d27fc
|
117 |
;; yasnippet |
707431
|
118 |
(use-package yasnippet |
C |
119 |
:ensure t |
|
120 |
:config |
|
121 |
(yas-global-mode 1) |
|
122 |
(setq auto-package-update-delete-old-versions t) |
|
123 |
(setq auto-package-update-hide-results t) |
|
124 |
(auto-package-update-maybe)) |
5cb5f7
|
125 |
|
9d27fc
|
126 |
;; ggtags |
707431
|
127 |
(use-package ggtags |
C |
128 |
:ensure t |
|
129 |
:config |
|
130 |
(add-hook 'c-mode-common-hook |
|
131 |
(lambda |
|
132 |
(when (derived-mode-p 'c-mode 'c++-mode 'java-mode) |
|
133 |
(ggtags-mode 1)))) |
|
134 |
(setq auto-package-update-delete-old-versions t) |
|
135 |
(setq auto-package-update-hide-results t) |
|
136 |
(auto-package-update-maybe)) |
5cb5f7
|
137 |
|
9d27fc
|
138 |
;; workgroups2 |
707431
|
139 |
(use-package workgroups |
C |
140 |
:ensure t |
|
141 |
:config |
|
142 |
(workgroups-mode 1) |
|
143 |
(setq auto-package-update-delete-old-versions t) |
|
144 |
(setq auto-package-update-hide-results t) |
|
145 |
(auto-package-update-maybe)) |
5cb5f7
|
146 |
|
9d27fc
|
147 |
;; smartparens |
707431
|
148 |
(use-package smartparens |
C |
149 |
:ensure t |
|
150 |
:diminish smartparens-mode |
|
151 |
:config |
|
152 |
(progn |
|
153 |
(require 'smartparens-config) |
|
154 |
(smartparens-global-mode 1)) |
|
155 |
(setq auto-package-update-delete-old-versions t) |
|
156 |
(setq auto-package-update-hide-results t) |
|
157 |
(auto-package-update-maybe)) |
5cb5f7
|
158 |
|
C |
159 |
;; clean-aindent-mode |
707431
|
160 |
(use-package clean-aindent-mode |
C |
161 |
:ensure t |
|
162 |
:hook prog-mode |
|
163 |
:config |
|
164 |
(setq auto-package-update-delete-old-versions t) |
|
165 |
(setq auto-package-update-hide-results t) |
|
166 |
(auto-package-update-maybe)) |
5cb5f7
|
167 |
|
C |
168 |
;; company config |
707431
|
169 |
(use-package company |
C |
170 |
:ensure t |
|
171 |
:init (global-company-mode) |
|
172 |
:config |
|
173 |
(add-to-list 'company-backends 'company-c-headers) |
|
174 |
(add-hook 'c-mode-common-hook |
|
175 |
(lambda () |
|
176 |
(define-key c-mode-base-map [(tab)] 'company-complete))) |
|
177 |
(setq auto-package-update-delete-old-versions t) |
|
178 |
(setq auto-package-update-hide-results t) |
|
179 |
(auto-package-update-maybe)) |
5cb5f7
|
180 |
|
C |
181 |
;; projectile config |
707431
|
182 |
(use-package projectile |
C |
183 |
:ensure t |
|
184 |
:bind (("C-c p" . projectile-command-map)) |
|
185 |
:config |
|
186 |
(projectile-global-mode) |
|
187 |
(setq projectile-completion-system 'helm) |
|
188 |
(setq projectile-indexing-method 'alien) |
|
189 |
(setq auto-package-update-delete-old-versions t) |
|
190 |
(setq auto-package-update-hide-results t) |
|
191 |
(auto-package-update-maybe)) |
5cb5f7
|
192 |
|
707431
|
193 |
(use-package helm-projectile |
C |
194 |
:ensure t |
|
195 |
:config |
|
196 |
(helm-projectile-on) |
|
197 |
(setq auto-package-update-delete-old-versions t) |
|
198 |
(setq auto-package-update-hide-results t) |
|
199 |
(auto-package-update-maybe)) |
5cb5f7
|
200 |
|
C |
201 |
;; magit config |
707431
|
202 |
(use-package magit |
C |
203 |
:commands magit-get-top-dir |
|
204 |
:bind (("C-x g s" . magit-status) |
|
205 |
("C-x g f" . magit-file-log) |
|
206 |
("C-x g h" . magit-log) |
|
207 |
("C-x g c" . magit-branch) |
|
208 |
("C-x g t" . magit-tag)) |
|
209 |
:init |
|
210 |
(progn |
5cb5f7
|
211 |
|
707431
|
212 |
;; we no longer need vc-git |
C |
213 |
(delete 'Git vc-handled-backends) |
|
214 |
;; make magit status go full-screen but remember previous window |
|
215 |
;; settings |
|
216 |
;; from: http://whattheemacsd.com/setup-magit.el-01.html |
|
217 |
(defadvice magit-status (around magit-fullscreen activate) |
|
218 |
(window-configuration-to-register :magit-fullscreen) |
|
219 |
ad-do-it |
|
220 |
(delete-other-windows)) |
|
221 |
|
|
222 |
;; Close popup when commiting - this stops the commit window |
|
223 |
;; hanging around |
|
224 |
;; From: http://git.io/rPBE0Q |
|
225 |
(defadvice git-commit-commit (after delete-window activate) |
|
226 |
(delete-window)) |
|
227 |
|
|
228 |
(defadvice git-commit-abort (after delete-window activate) |
|
229 |
(delete-window)) |
|
230 |
|
|
231 |
;; these two force a new line to be inserted into a commit window, |
|
232 |
;; which stops the invalid style showing up. |
|
233 |
;; From: http://git.io/rPBE0Q |
|
234 |
(defun magit-commit-mode-init () |
|
235 |
(when (looking-at "\n") |
|
236 |
(open-line 1))) |
|
237 |
|
|
238 |
(add-hook 'git-commit-mode-hook 'magit-commit-mode-init)) |
|
239 |
:config |
|
240 |
(progn |
|
241 |
;; restore previously hidden windows |
|
242 |
(defadvice magit-quit-window (around magit-restore-screen activate) |
|
243 |
(let ((current-mode major-mode)) |
|
244 |
ad-do-it |
|
245 |
;; we only want to jump to register when the last seen buffer |
|
246 |
;; was a magit-status buffer. |
|
247 |
(when (eq 'magit-status-mode current-mode) |
|
248 |
(jump-to-register :magit-fullscreen)))) |
|
249 |
|
|
250 |
(defun magit-maybe-commit (&optional show-options) |
|
251 |
"Runs magit-commit unless prefix is passed" |
|
252 |
(interactive "P") |
|
253 |
(if show-options |
|
254 |
(magit-key-mode-popup-committing) |
|
255 |
(magit-commit))) |
|
256 |
|
|
257 |
(define-key magit-mode-map "c" 'magit-maybe-commit) |
|
258 |
|
|
259 |
;; major mode for editing `git rebase -i` files |
|
260 |
(use-package rebase-mode) |
|
261 |
|
|
262 |
;; magit settings |
|
263 |
(setq |
|
264 |
;; use ido to look for branches |
|
265 |
magit-completing-read-function 'magit-ido-completing-read |
|
266 |
;; don't put "origin-" in front of new branch names by default |
|
267 |
magit-default-tracking-name-function 'magit-default-tracking-name-branch-only |
|
268 |
;; open magit status in same window as current buffer |
|
269 |
magit-status-buffer-switch-function 'switch-to-buffer |
|
270 |
;; highlight word/letter changes in hunk diffs |
|
271 |
magit-diff-refine-hunk t |
|
272 |
;; ask me if I want to include a revision when rewriting |
|
273 |
magit-rewrite-inclusive 'ask |
|
274 |
;; ask me to save buffers |
|
275 |
magit-save-some-buffers t |
|
276 |
;; pop the process buffer if we're taking a while to complete |
|
277 |
magit-process-popup-time 10 |
|
278 |
;; ask me if I want a tracking upstream |
|
279 |
magit-set-upstream-on-push 'askifnotset |
|
280 |
) |
|
281 |
(setq auto-package-update-delete-old-versions t) |
|
282 |
(setq auto-package-update-hide-results t) |
|
283 |
(auto-package-update-maybe))) |
5cb5f7
|
284 |
|
C |
285 |
;; flycheck |
707431
|
286 |
(use-package flycheck |
C |
287 |
:ensure t |
|
288 |
:init (global-flycheck-mode) |
|
289 |
:config |
|
290 |
(setq auto-package-update-delete-old-versions t) |
|
291 |
(setq auto-package-update-hide-results t) |
|
292 |
(auto-package-update-maybe)) |
5cb5f7
|
293 |
|
707431
|
294 |
(use-package flycheck-pos-tip |
C |
295 |
:ensure t |
|
296 |
:after flycheck |
|
297 |
:config |
|
298 |
(flycheck-pos-tip-mode) |
|
299 |
(setq auto-package-update-delete-old-versions t) |
|
300 |
(setq auto-package-update-hide-results t) |
|
301 |
(auto-package-update-maybe)) |
5cb5f7
|
302 |
|
C |
303 |
;; nyan mode |
707431
|
304 |
(use-package nyan-mode |
C |
305 |
:if window-system |
|
306 |
:ensure t |
|
307 |
:config |
|
308 |
(nyan-mode)) |
5cb5f7
|
309 |
|
C |
310 |
;; semantic refactor |
707431
|
311 |
(use-package srefactor |
C |
312 |
:ensure t |
|
313 |
:config |
|
314 |
(semantic-mode 1) |
|
315 |
(setq auto-package-update-delete-old-versions t) |
|
316 |
(setq auto-package-update-hide-results t) |
|
317 |
(auto-package-update-maybe)) |
5cb5f7
|
318 |
|
C |
319 |
;; guide-key |
707431
|
320 |
(use-package guide-key |
C |
321 |
:ensure t |
|
322 |
:config |
|
323 |
(setq guide-key/guide-key-sequence '("C-x" "C-c" "M-g" "C-h")) |
|
324 |
(setq guide-key/recursive-key-sequence-flag t) |
|
325 |
(setq guide-key/popup-window-position 'bottom) |
|
326 |
(guide-key-mode 1) |
|
327 |
(setq auto-package-update-delete-old-versions t) |
|
328 |
(setq auto-package-update-hide-results t) |
|
329 |
(auto-package-update-maybe)) |
8f6f27
|
330 |
|
a4b917
|
331 |
;; x86 lookup |
707431
|
332 |
(use-package x86-lookup |
C |
333 |
:ensure t |
|
334 |
:init |
|
335 |
(setq x86-lookup-pdf "D:/Coding/x86-instructions.pdf") |
|
336 |
:bind ("C-h x" . x86-lookup) |
|
337 |
:config |
|
338 |
(setq auto-package-update-delete-old-versions t) |
|
339 |
(setq auto-package-update-hide-results t) |
|
340 |
(auto-package-update-maybe)) |
8f6f27
|
341 |
|
c655ee
|
342 |
;; org-bullets |
707431
|
343 |
(use-package org-bullets |
C |
344 |
:ensure t |
|
345 |
:hook org-mode |
|
346 |
:config |
|
347 |
(setq auto-package-update-delete-old-versions t) |
|
348 |
(setq auto-package-update-hide-results t) |
|
349 |
(auto-package-update-maybe)) |
c655ee
|
350 |
|
a4b917
|
351 |
;; pdf-tools |
707431
|
352 |
(use-package pdf-tools |
C |
353 |
:ensure t |
|
354 |
:config |
|
355 |
(pdf-tools-install) |
|
356 |
(setq auto-package-update-delete-old-versions t) |
|
357 |
(setq auto-package-update-hide-results t) |
|
358 |
(auto-package-update-maybe)) |
|
359 |
|
|
360 |
(use-package org |
|
361 |
:ensure t |
|
362 |
:config |
|
363 |
(setq auto-package-update-delete-old-versions t) |
|
364 |
(setq auto-package-update-hide-results t) |
|
365 |
(auto-package-update-maybe)) |
8f6f27
|
366 |
|
C |
367 |
(custom-set-variables |
|
368 |
;; custom-set-variables was added by Custom. |
|
369 |
;; If you edit it by hand, you could mess it up, so be careful. |
|
370 |
;; Your init file should contain only one such instance. |
|
371 |
;; If there is more than one, they won't work right. |
e75a20
|
372 |
'(custom-safe-themes |
C |
373 |
(quote |
|
374 |
("ec5f697561eaf87b1d3b087dd28e61a2fc9860e4c862ea8e6b0b77bd4967d0ba" default))) |
8f6f27
|
375 |
'(package-selected-packages |
C |
376 |
(quote |
e75a20
|
377 |
(zenburn-theme org flycheck-pos-tip flycheck rtags racket-mode geiser auto-package-update use-package pdf-tools org-bullets x86-lookup ztree yasnippet workgroups2 volatile-highlights undo-tree srefactor smartparens nyan-mode magit ibuffer-vc helm-projectile guide-key ggtags diff-hl company-c-headers clean-aindent-mode)))) |
8f6f27
|
378 |
(custom-set-faces |
C |
379 |
;; custom-set-faces was added by Custom. |
|
380 |
;; If you edit it by hand, you could mess it up, so be careful. |
|
381 |
;; Your init file should contain only one such instance. |
|
382 |
;; If there is more than one, they won't work right. |
|
383 |
) |