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