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