commit | author | age
|
424743
|
1 |
(setq inhibit-startup-message t) |
C |
2 |
|
5cb5f7
|
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 |
ffe3f5
|
120 |
(global-ede-mode t)) |
C |
121 |
|
be0bc3
|
122 |
|
C |
123 |
(setq |
|
124 |
;; use gdb-many-windows by default |
|
125 |
gdb-many-windows t |
|
126 |
|
|
127 |
;; Non-nil means display source file containing the main routine at startup |
|
128 |
gdb-show-main t |
|
129 |
) |
5cb5f7
|
130 |
|
9d27fc
|
131 |
;; undo-tree |
707431
|
132 |
(use-package undo-tree |
C |
133 |
:ensure t |
|
134 |
:config |
|
135 |
(global-undo-tree-mode) |
|
136 |
(setq auto-package-update-delete-old-versions t) |
|
137 |
(setq auto-package-update-hide-results t) |
|
138 |
(auto-package-update-maybe)) |
5cb5f7
|
139 |
|
9d27fc
|
140 |
;; volatile highlights |
707431
|
141 |
(use-package volatile-highlights |
C |
142 |
:ensure t |
|
143 |
:config |
|
144 |
(volatile-highlights-mode t) |
|
145 |
(setq auto-package-update-delete-old-versions t) |
|
146 |
(setq auto-package-update-hide-results t) |
|
147 |
(auto-package-update-maybe)) |
5cb5f7
|
148 |
|
9d27fc
|
149 |
;; yasnippet |
707431
|
150 |
(use-package yasnippet |
C |
151 |
:ensure t |
|
152 |
:config |
|
153 |
(yas-global-mode 1) |
|
154 |
(setq auto-package-update-delete-old-versions t) |
|
155 |
(setq auto-package-update-hide-results t) |
|
156 |
(auto-package-update-maybe)) |
5cb5f7
|
157 |
|
9d27fc
|
158 |
;; ggtags |
707431
|
159 |
(use-package ggtags |
C |
160 |
:ensure t |
|
161 |
:config |
|
162 |
(add-hook 'c-mode-common-hook |
|
163 |
(lambda |
|
164 |
(when (derived-mode-p 'c-mode 'c++-mode 'java-mode) |
|
165 |
(ggtags-mode 1)))) |
|
166 |
(setq auto-package-update-delete-old-versions t) |
|
167 |
(setq auto-package-update-hide-results t) |
|
168 |
(auto-package-update-maybe)) |
5cb5f7
|
169 |
|
9d27fc
|
170 |
;; workgroups2 |
658093
|
171 |
(use-package workgroups2 |
707431
|
172 |
:ensure t |
C |
173 |
:config |
|
174 |
(workgroups-mode 1) |
|
175 |
(setq auto-package-update-delete-old-versions t) |
|
176 |
(setq auto-package-update-hide-results t) |
|
177 |
(auto-package-update-maybe)) |
5cb5f7
|
178 |
|
9d27fc
|
179 |
;; smartparens |
707431
|
180 |
(use-package smartparens |
C |
181 |
:ensure t |
|
182 |
:diminish smartparens-mode |
|
183 |
:config |
|
184 |
(progn |
|
185 |
(require 'smartparens-config) |
|
186 |
(smartparens-global-mode 1)) |
|
187 |
(setq auto-package-update-delete-old-versions t) |
|
188 |
(setq auto-package-update-hide-results t) |
|
189 |
(auto-package-update-maybe)) |
5cb5f7
|
190 |
|
C |
191 |
;; clean-aindent-mode |
707431
|
192 |
(use-package clean-aindent-mode |
C |
193 |
:ensure t |
|
194 |
:hook prog-mode |
|
195 |
:config |
|
196 |
(setq auto-package-update-delete-old-versions t) |
|
197 |
(setq auto-package-update-hide-results t) |
|
198 |
(auto-package-update-maybe)) |
5cb5f7
|
199 |
|
C |
200 |
;; company config |
707431
|
201 |
(use-package company |
C |
202 |
:ensure t |
|
203 |
:init (global-company-mode) |
|
204 |
:config |
|
205 |
(add-hook 'c-mode-common-hook |
|
206 |
(lambda () |
|
207 |
(define-key c-mode-base-map [(tab)] 'company-complete))) |
178ab9
|
208 |
(setq auto-package-update-delete-old-versions t) |
C |
209 |
(setq auto-package-update-hide-results t) |
|
210 |
(auto-package-update-maybe)) |
|
211 |
|
|
212 |
(use-package company-c-headers |
|
213 |
:ensure t |
9c4cf0
|
214 |
:after company |
178ab9
|
215 |
:config |
C |
216 |
(add-to-list 'company-backends 'company-c-headers) |
9c4cf0
|
217 |
(setq auto-package-update-delete-old-versions t) |
C |
218 |
(setq auto-package-update-hide-results t) |
|
219 |
(auto-package-update-maybe)) |
|
220 |
|
|
221 |
(use-package company-math |
|
222 |
:ensure t |
|
223 |
:after company |
|
224 |
:config |
|
225 |
(add-to-list 'company-backends 'company-math-symbols-unicode) |
707431
|
226 |
(setq auto-package-update-delete-old-versions t) |
C |
227 |
(setq auto-package-update-hide-results t) |
|
228 |
(auto-package-update-maybe)) |
5cb5f7
|
229 |
|
C |
230 |
;; projectile config |
707431
|
231 |
(use-package projectile |
C |
232 |
:ensure t |
|
233 |
:bind (("C-c p" . projectile-command-map)) |
|
234 |
:config |
|
235 |
(projectile-global-mode) |
|
236 |
(setq projectile-completion-system 'helm) |
|
237 |
(setq projectile-indexing-method 'alien) |
|
238 |
(setq auto-package-update-delete-old-versions t) |
|
239 |
(setq auto-package-update-hide-results t) |
|
240 |
(auto-package-update-maybe)) |
5cb5f7
|
241 |
|
707431
|
242 |
(use-package helm-projectile |
C |
243 |
:ensure t |
|
244 |
:config |
|
245 |
(helm-projectile-on) |
|
246 |
(setq auto-package-update-delete-old-versions t) |
|
247 |
(setq auto-package-update-hide-results t) |
|
248 |
(auto-package-update-maybe)) |
5cb5f7
|
249 |
|
C |
250 |
;; magit config |
707431
|
251 |
(use-package magit |
be0bc3
|
252 |
:ensure t |
707431
|
253 |
:commands magit-get-top-dir |
510642
|
254 |
:bind ("C-x g" . magit-status) |
707431
|
255 |
:init |
C |
256 |
(progn |
|
257 |
;; make magit status go full-screen but remember previous window |
|
258 |
;; settings |
|
259 |
;; from: http://whattheemacsd.com/setup-magit.el-01.html |
|
260 |
(defadvice magit-status (around magit-fullscreen activate) |
|
261 |
(window-configuration-to-register :magit-fullscreen) |
|
262 |
ad-do-it |
|
263 |
(delete-other-windows)) |
|
264 |
|
|
265 |
;; Close popup when commiting - this stops the commit window |
|
266 |
;; hanging around |
|
267 |
;; From: http://git.io/rPBE0Q |
|
268 |
(defadvice git-commit-commit (after delete-window activate) |
|
269 |
(delete-window)) |
|
270 |
|
|
271 |
(defadvice git-commit-abort (after delete-window activate) |
|
272 |
(delete-window)) |
|
273 |
|
|
274 |
:config |
|
275 |
(progn |
|
276 |
;; restore previously hidden windows |
|
277 |
(defadvice magit-quit-window (around magit-restore-screen activate) |
|
278 |
(let ((current-mode major-mode)) |
|
279 |
ad-do-it |
|
280 |
;; we only want to jump to register when the last seen buffer |
|
281 |
;; was a magit-status buffer. |
|
282 |
(when (eq 'magit-status-mode current-mode) |
be0bc3
|
283 |
(jump-to-register :magit-fullscreen))))) |
707431
|
284 |
|
be0bc3
|
285 |
;; magit settings |
C |
286 |
(setq |
|
287 |
;; don't put "origin-" in front of new branch names by default |
|
288 |
magit-default-tracking-name-function 'magit-default-tracking-name-branch-only |
|
289 |
;; open magit status in same window as current buffer |
|
290 |
magit-status-buffer-switch-function 'switch-to-buffer |
|
291 |
;; highlight word/letter changes in hunk diffs |
|
292 |
magit-diff-refine-hunk t |
|
293 |
;; ask me if I want to include a revision when rewriting |
|
294 |
magit-rewrite-inclusive 'ask |
|
295 |
;; ask me to save buffers |
|
296 |
magit-save-some-buffers t |
|
297 |
;; pop the process buffer if we're taking a while to complete |
|
298 |
magit-process-popup-time 10 |
|
299 |
;; ask me if I want a tracking upstream |
|
300 |
magit-set-upstream-on-push 'askifnotset |
|
301 |
) |
|
302 |
(setq auto-package-update-delete-old-versions t) |
707431
|
303 |
(setq auto-package-update-hide-results t) |
C |
304 |
(auto-package-update-maybe))) |
5cb5f7
|
305 |
|
C |
306 |
;; flycheck |
707431
|
307 |
(use-package flycheck |
C |
308 |
:ensure t |
|
309 |
:init (global-flycheck-mode) |
|
310 |
:config |
|
311 |
(setq auto-package-update-delete-old-versions t) |
|
312 |
(setq auto-package-update-hide-results t) |
|
313 |
(auto-package-update-maybe)) |
5cb5f7
|
314 |
|
707431
|
315 |
(use-package flycheck-pos-tip |
C |
316 |
:ensure t |
|
317 |
:after flycheck |
|
318 |
:config |
|
319 |
(flycheck-pos-tip-mode) |
|
320 |
(setq auto-package-update-delete-old-versions t) |
|
321 |
(setq auto-package-update-hide-results t) |
|
322 |
(auto-package-update-maybe)) |
5cb5f7
|
323 |
|
2a15f9
|
324 |
(use-package flycheck-clang-analyzer |
C |
325 |
:ensure t |
|
326 |
:after flycheck |
|
327 |
:config |
|
328 |
(flycheck-clang-analyzer-setup) |
|
329 |
(setq auto-package-update-delete-old-versions t) |
|
330 |
(setq auto-package-update-hide-results t) |
|
331 |
(auto-package-update-maybe)) |
|
332 |
|
5cb5f7
|
333 |
;; nyan mode |
707431
|
334 |
(use-package nyan-mode |
C |
335 |
:if window-system |
|
336 |
:ensure t |
|
337 |
:config |
|
338 |
(nyan-mode)) |
5cb5f7
|
339 |
|
C |
340 |
;; semantic refactor |
2a15f9
|
341 |
(use-package srefactor |
C |
342 |
:ensure t |
|
343 |
:bind (("M-RET o" . 'srefactor-lisp-one-line) |
|
344 |
("M-RET m" . 'srefactor-lisp-format-sexp) |
|
345 |
("M-RET d" . 'srefactor-lisp-format-defun) |
|
346 |
("M-RET b" . 'srefactor-lisp-format-buffer) |
|
347 |
:map c-mode-base-map |
|
348 |
("M-RET" . 'srefactor-refactor-at-point) |
|
349 |
:map c++-mode-map |
|
350 |
("M-RET" . 'srefactor-refactor-at-point)) |
|
351 |
:config |
707431
|
352 |
(setq auto-package-update-delete-old-versions t) |
C |
353 |
(setq auto-package-update-hide-results t) |
|
354 |
(auto-package-update-maybe)) |
5cb5f7
|
355 |
|
629a86
|
356 |
;; which-key |
C |
357 |
(use-package which-key |
707431
|
358 |
:ensure t |
C |
359 |
:config |
629a86
|
360 |
(which-key-mode) |
C |
361 |
(which-key-setup-side-window-bottom) |
707431
|
362 |
(setq auto-package-update-delete-old-versions t) |
C |
363 |
(setq auto-package-update-hide-results t) |
|
364 |
(auto-package-update-maybe)) |
8f6f27
|
365 |
|
a4b917
|
366 |
;; x86 lookup |
707431
|
367 |
(use-package x86-lookup |
C |
368 |
:ensure t |
|
369 |
:init |
|
370 |
(setq x86-lookup-pdf "D:/Coding/x86-instructions.pdf") |
|
371 |
:bind ("C-h x" . x86-lookup) |
|
372 |
:config |
|
373 |
(setq auto-package-update-delete-old-versions t) |
|
374 |
(setq auto-package-update-hide-results t) |
|
375 |
(auto-package-update-maybe)) |
8f6f27
|
376 |
|
c655ee
|
377 |
;; org-bullets |
707431
|
378 |
(use-package org-bullets |
C |
379 |
:ensure t |
|
380 |
:config |
9c4cf0
|
381 |
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) |
707431
|
382 |
(setq auto-package-update-delete-old-versions t) |
C |
383 |
(setq auto-package-update-hide-results t) |
|
384 |
(auto-package-update-maybe)) |
c655ee
|
385 |
|
a4b917
|
386 |
;; pdf-tools |
707431
|
387 |
(use-package pdf-tools |
C |
388 |
:ensure t |
|
389 |
:config |
|
390 |
(pdf-tools-install) |
|
391 |
(setq auto-package-update-delete-old-versions t) |
|
392 |
(setq auto-package-update-hide-results t) |
|
393 |
(auto-package-update-maybe)) |
|
394 |
|
2a15f9
|
395 |
;; org |
707431
|
396 |
(use-package org |
C |
397 |
:ensure t |
|
398 |
:config |
9c4cf0
|
399 |
(setq org-src-tab-acts-natively t) |
707431
|
400 |
(setq auto-package-update-delete-old-versions t) |
C |
401 |
(setq auto-package-update-hide-results t) |
|
402 |
(auto-package-update-maybe)) |
8f6f27
|
403 |
|
2a15f9
|
404 |
;; tex/AUCTex |
178ab9
|
405 |
(use-package tex |
C |
406 |
:ensure auctex |
|
407 |
:config |
2a15f9
|
408 |
(setq TeX-auto-save t) |
C |
409 |
(setq TeX-parse-self t) |
9c4cf0
|
410 |
(setq doc-view-ghostscript-program "c:/msys64/mingw64/bin/gswin32c.exe") |
C |
411 |
(setq preview-gs-command "c:/msys64/mingw64/bin/gs.exe") |
|
412 |
(setq auto-package-update-delete-old-versions t) |
|
413 |
(setq auto-package-update-hide-results t) |
|
414 |
(auto-package-update-maybe)) |
|
415 |
|
|
416 |
;; latex-preview-pane |
|
417 |
(use-package latex-preview-pane |
|
418 |
:ensure t |
|
419 |
:config |
|
420 |
(latex-preview-pane-enable) |
178ab9
|
421 |
(setq auto-package-update-delete-old-versions t) |
C |
422 |
(setq auto-package-update-hide-results t) |
|
423 |
(auto-package-update-maybe)) |
|
424 |
|
424743
|
425 |
;; plantuml |
C |
426 |
(use-package plantuml-mode |
|
427 |
:ensure t |
|
428 |
:init |
|
429 |
(setq plantuml-jar-path "c:/ProgramData/chocolatey/lib/plantuml/tools/plantuml.jar") |
|
430 |
:config |
|
431 |
(setq auto-package-update-delete-old-versions t) |
|
432 |
(setq auto-package-update-hide-results t) |
|
433 |
(auto-package-update-maybe)) |
ffe3f5
|
434 |
(custom-set-variables |
C |
435 |
;; custom-set-variables was added by Custom. |
|
436 |
;; If you edit it by hand, you could mess it up, so be careful. |
|
437 |
;; Your init file should contain only one such instance. |
|
438 |
;; If there is more than one, they won't work right. |
|
439 |
'(ede-project-directories (quote ("c:/Users/joelg/.emacs.d")))) |
|
440 |
(custom-set-faces |
|
441 |
;; custom-set-faces was added by Custom. |
|
442 |
;; If you edit it by hand, you could mess it up, so be careful. |
|
443 |
;; Your init file should contain only one such instance. |
|
444 |
;; If there is more than one, they won't work right. |
|
445 |
) |