-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO.txt
434 lines (235 loc) · 10.6 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
(deftheme wheatgrass
"High-contrast green/blue/brown faces on a black background.
Basic, Font Lock, Isearch, Gnus, and Message faces are included.
The default face foreground is wheat, with other faces in shades
of green, brown, and blue.")
(let ((class '((class color) (min-colors 89))))
(custom-theme-set-faces
'wheatgrass
`(default ((,class (:foreground "wheat" :background "black"))))
`(cursor ((,class (:background "thistle"))))
`(error ((,class (:foreground "salmon1"))))
`(warning ((,class (:foreground "orange"))))
`(success ((,class (:foreground "yellow green"))))
;; Compilation faces
`(compilation-mode-line-fail ((,class (:foreground "dark green"))))
`(compilation-mode-line-run ((,class (:foreground "dark goldenrod"))))
`(compilation-mode-line-exit ((,class (:foreground "SpringGreen4"))))
;; Highlighting faces
`(highlight ((,class (:foreground "white" :background "dark green"))))
`(region ((,class (:foreground "white" :background "dark green"))))
`(secondary-selection ((,class (:background "dark slate gray"))))
`(isearch ((,class (:foreground "white" :background "dark goldenrod"))))
`(lazy-highlight ((,class (:background "gray25"))))
;; Font lock faces
`(font-lock-builtin-face ((,class (:foreground "LightSteelBlue"))))
`(font-lock-comment-face ((,class (:foreground "SpringGreen3"))))
`(font-lock-constant-face ((,class (:foreground "turquoise"))))
`(font-lock-function-name-face ((,class (:foreground "pale green"))))
`(font-lock-keyword-face ((,class (:foreground "white"))))
`(font-lock-string-face ((,class (:foreground "dark khaki"))))
`(font-lock-type-face ((,class (:foreground "aquamarine"))))
`(font-lock-variable-name-face ((,class (:foreground "yellow green"))))
;; Button and link faces
`(link ((,class (:underline t :foreground "cyan"))))
`(link-visited ((,class (:underline t :foreground "dark cyan"))))
;; Gnus faces
`(gnus-header-content ((,class (:weight normal :foreground "yellow green"))))
`(gnus-header-from ((,class (:foreground "pale green"))))
`(gnus-header-subject ((,class (:foreground "pale turquoise"))))
`(gnus-header-name ((,class (:foreground "dark sea green"))))
`(gnus-header-newsgroups ((,class (:foreground "dark khaki"))))
;; Message faces
`(message-header-name ((,class (:foreground "dark turquoise"))))
`(message-header-cc ((,class (:foreground "yellow green"))))
`(message-header-other ((,class (:foreground "dark khaki"))))
`(message-header-subject ((,class (:foreground "pale turquoise"))))
`(message-header-to ((,class (:foreground "pale green"))))
`(message-cited-text ((,class (:foreground "SpringGreen3"))))
`(message-separator ((,class (:foreground "deep sky blue"))))
;; Realgud faces
`(realgud-overlay-arrow1 ((,class (:foreground "SpringGreen3"))))
`(realgud-overlay-arrow2 ((,class (:foreground "white"))))
`(realgud-overlay-arrow3 ((,class (:foreground "wheat"))))
`(realgud-bp-enabled-face ((,class (:inherit error))))
`(realgud-bp-disabled-face ((,class (:foreground "dark slate gray"))))
`(realgud-bp-line-enabled-face ((,class (:underline "SpringGreen3"))))
`(realgud-bp-line-disabled-face ((,class (:underline "salmon"))))
`(realgud-file-name ((,class (:foreground "dark khaki"))))
`(realgud-line-number ((,class (:foreground "dark cyan"))))
`(realgud-backtrace-number ((,class (:foreground "dark cyan" :weight bold))))))
(provide-theme 'wheatgrass)
Error during redisplay: (jit-lock-function 12541) signaled (invalid-regexp "Unmatched ) or \\)") [3 times]
File mode specification error: (invalid-function (function sboo-color-comment-keywords))
https://bitbucket.org/justinhj/company-custom-dictionary/src/master/
https://github.com/bradwright/emacs-d/blob/master/packages/init-edit-server.el
;;; `sboo-keymap'
(defconst sboo-map-prefix-key (kbd "<s>")
"Prefix Key for `sboo-map'.
Why not not the default keymap reserved for users, `C-c'? Because (1) that conflicts with `cua-mode', and (2) many packages don't respect that convention anyways.
`<s>' is called the "Super" Key. On my keyboard (on a Windows laptop running Linux), it's the Windows-Logo Key.")
(defconst sboo-map (make-sparse-keymap)
"“User” KeyBindings.
Mostly:
* (1) `sboo-*' commands (like `sboo-set-font');
* (2) keymaps grouped by mode (like `<s>-g' as a keymap for `magit' commands), or sometimes by function.
See:
* URL `http://ergoemacs.org/emacs/elisp_create_major_mode_keymap.html'.
* URL `http://ergoemacs.org/emacs_manual/elisp/Keymaps.html'.
Current Keybindings:
\\{sboo-map}")
;; ^ "A prefix key is a key sequence whose binding is a keymap. The keymap defines what to do with key sequences that extend the prefix key. For example, C-x is a prefix key, and it uses a keymap that is also stored in the variable ctl-x-map. This keymap defines bindings for key sequences starting with C-x."
(cl-defmacro sboo-key (KEYSEQUENCE FUNCTION)
"Declare a keybinding within `sboo-map'.
Parameters:
KEYSEQUENCE: a string for `kbd'.
FUNCTION: an **unquoted** function name.
Examples:
(sboo-key \"g l\" magit-status)
⇒ (`define-key' `sboo-map'
(kbd \"g l\")
#'magit-status)
"
`(define-key ,sboo-map
(kbd ,KEYSEQUENCE)
(function ,FUNCTION)))
;; ^
;(cl-defmacro sboo-key! (:keys KEYS :bind FUNCTION)
(defun load-sboo-map ()
""
()
(global-set-key sboo-map-prefix-key 'sboo-map))
(defun unload-sboo-map ()
""
()
(global-unset-key sboo-map-prefix-key)
;;TODO sboo-menu-map
See:
* URL `http://ergoemacs.org/emacs_manual/elisp/Menu-Keymaps.html'.
* URL `'.
* URL `'.
;;; Bootstrap `use-package'
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
;;; Git UI
(use-package magit
:defer t
:bind (("C-c g" . magit-status)
("C-c C-g l" . magit-file-log))
:init (progn
("g s" . magit-status)
("g l" . magit-file-log)
(setq global-auto-revert-mode t)
(setq auto-revert-verbose t)
;; open magit status in same window as current buffer
magit-status-buffer-switch-function 'switch-to-buffer
;; highlight word/letter changes in hunk diffs
magit-diff-refine-hunk t
;; ask me if I want to include a revision when rewriting
magit-rewrite-inclusive 'ask
;; ask me to save buffers
;magit-save-some-buffers t
;; pop the process buffer if we're taking a while to complete
magit-process-popup-time 10
;; ask me if I want a tracking upstream
magit-set-upstream-on-push 'askifnotset
:config (progn
())
;; ^ See:
;;
;; * URL `https://github.com/magit/magit'
;; * URL `https://magit.vc/manual/magit.html#Automatic-Reverting-of-File_002dVisiting-Buffers'
;;
;; we no longer need vc-git
(delete 'Git vc-handled-backends)
;; make magit status go full-screen but remember previous window
;; settings
;; from: http://whattheemacsd.com/setup-magit.el-01.html
(defadvice magit-status (around magit-fullscreen activate)
(window-configuration-to-register :magit-fullscreen)
ad-do-it
(delete-other-windows))
;; Close popup when commiting - this stops the commit window
;; hanging around
;; From: http://git.io/rPBE0Q
(defadvice git-commit-commit (after delete-window activate)
(delete-window))
(defadvice git-commit-abort (after delete-window activate)
(delete-window))
;; these two force a new line to be inserted into a commit window,
;; which stops the invalid style showing up.
;; From: http://git.io/rPBE0Q
(defun magit-commit-mode-init ()
(when (looking-at "\n")
(open-line 1)))
(add-hook 'git-commit-mode-hook 'magit-commit-mode-init))
:config
(progn
;; restore previously hidden windows
(defadvice magit-quit-window (around magit-restore-screen activate)
(let ((current-mode major-mode))
ad-do-it
;; we only want to jump to register when the last seen buffer
;; was a magit-status buffer.
(when (eq 'magit-status-mode current-mode)
(jump-to-register :magit-fullscreen))))
;; NOTE re: « C-m » & « C-i »
;;
;; Emacs within a TerminalEmulator can't distinguish:
;;
;; * « C-m » from « <return> »
;; * « C-i » from « <tab> »,
;;
;; Why? Because they're translated by the TerminalEmulator before reaching any process (/ application).
;;
;; e.g. « C-h c C-m » prints « RET runs the command newline ».
;; e.g. « C-h c C-i » prints « TAB runs the command tab ».
;;
;; See:
;;
;; * URL `https://stackoverflow.com/a/4322265/1337806:
;; * URL `https://emacs.stackexchange.com/questions/17509/how-to-distinguish-c-i-from-tab'
;;
;; yaml-mode doesn't autoload
(use-package yaml-mode
:mode ("\\.ya?ml\\'" . yaml-mode)
:config
(progn
(put 'yaml-indent-offset 'safe-local-variable 'integerp)))
(use-package yasnippet
:diminish yas-minor-mode
:init
(progn
(yas-global-mode 1)
(defun sboo-disable-yas-minor-mode () (interactive) (yas-minor-mode -1))
;; we don't want yasnippet running in terminals
(add-hook 'term-mode-hook #'sboo-disable-yas-minor-mode)
(setq yas/prompt-functions '(yas/ido-prompt yas/completing-prompt));;TODO helm?
()))
(use-package markdown-mode
:mode (("\\.md$" . markdown-mode)
("\\.markdown$" . markdown-mode))
:config
(progn
(setq markdown-imenu-generic-expression
'(("title" "^\\(.*\\)[\n]=+$" 1)
("h2-" "^\\(.*\\)[\n]-+$" 1)
("h1" "^# \\(.*\\)$" 1)
("h2" "^## \\(.*\\)$" 1)
("h3" "^### \\(.*\\)$" 1)
("h4" "^#### \\(.*\\)$" 1)
("h5" "^##### \\(.*\\)$" 1)
("h6" "^###### \\(.*\\)$" 1)
("fn" "^\\[\\^\\(.*\\)\\]" 1)))
(add-hook 'markdown-mode-hook
(lambda ()
(setq imenu-generic-expression markdown-imenu-generic-expression)))))
;; Load custom settings if present
(setq custom-file "~/.emacs.d/custom.el")
(if (file-exists-p custom-file)
(load custom-file))
;;TODO "Support for menus on text-mode terminals." http://endlessparentheses.com/sweet-new-features-in-24-4.html
run-hooks: Wrong number of arguments: (((now 23807 8636 996882 400000) (now 23807 8636 944293 694000) t) (force) "Recompile and reload all « .yasnippet » files." (interactive "P") (yas-recompile-all) (yas-reload-all force) (require (quote sboo-yasnippets) nil :no-error)), 0
Error running timer ‘require’: (file-missing "Cannot open load file" "No such file or directory" "avy")
./scripts/add-vendor.sh https://github.com/nicferrier/elnode