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