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