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