rc

.spacemacs

1
;; NOTE: I no longer use Spacemacs. Please see init.el for Ghent Emacs settings.
2
;; -*- mode: emacs-lisp -*-
3
;; This file is loaded by Spacemacs at startup.
4
;; It must be stored in your home directory.
5
;;;; Local
6
(setq is-linuxp (eq system-type 'gnu/linux))
7
(defun os-path (x) (if is-linuxp x (expand-file-name x "c:")))
8
9
;;;; Core
10
11
(defvar dotspacemacs/layers/core
12
  '(
13
    git
14
    org ;; :variables
15
         ;;org-agenda-files '(
16
                            ;;"~/University/"
17
                            ;;"~/Repositories/private/org/"
18
                            ;;"~/University/COMPN/"))
19
    syntax-checking
20
    (auto-completion :variables
21
                     auto-completion-return-key-behavior 'complete
22
                     auto-completion-tab-key-behavior 'cycle
23
                     auto-completion-enable-snippets-in-popup t
24
                     auto-completion-complete-with-key-sequence-delay nil)
25
    ycmd
26
    helm
27
    (version-control :variables
28
                     version-control-global-margin t
29
                     version-control-diff-tool 'git-gutter+)
30
    )
31
  "Layers I consider core to Spacemacs")
32
33
;; Langs
34
35
(defvar dotspacemacs/layers/langs
36
  '(emacs-lisp
37
    (html :variables
38
          web-mode-enable-auto-pairing nil
39
          web-mode-enable-auto-closing nil
40
          web-mode-enable-auto-expanding nil
41
          web-mode-enable-auto-opening nil
42
          web-mode-enable-auto-quoting nil)
43
44
    markdown
45
    csv
46
    yaml
47
    ;rust
48
    (clojure :variables
49
             clojure-enable-fancify-symbols t)
50
    (haskell :variables
51
             haskell-completion-backend 'intero)
52
    (python :variables
53
            python-sort-imports-on-save t
54
            python-test-runner 'pytest)
55
    )
56
  "Programming and markup language layers")
57
58
;;;; Extra
59
60
(defvar dotspacemacs/layers/extra
61
  '(gnus
62
    graphviz
63
    themes-megapack
64
    ;; TODO: Needs configuration: http://spacemacs.org/layers/+themes/theming/README.html
65
    theming
66
    mu4e)
67
  "Miscellaneous layers")
68
69
(defun dotspacemacs/layers ()
70
  "Configuration Layers declaration.
71
You should not put any user code in this function besides modifying the variable
72
values."
73
  (setq-default
74
   ;; Base distribution to use. This is a layer contained in the directory
75
   ;; `+distribution'. For now available distributions are `spacemacs-base'
76
   ;; or `spacemacs'. (default 'spacemacs)
77
   dotspacemacs-distribution 'spacemacs
78
   ;; Lazy installation of layers (i.e. layers are installed only when a file
79
   ;; with a supported type is opened). Possible values are `all', `unused'
80
   ;; and `nil'. `unused' wilIn addition, we will also organise a second review moment on 30 November which will deal with broader code issues, such as OO structure, comments, naming, code style, robustness, logging, etc. (for preparation and inspiration, see http://www.phpied.com/how-to-write-unmaintainable-php-code-2009/)
81
82
   ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
83
   ;; lazy iELPAnstall any layer that support lazy installation even the layers
84
   ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
85
   ;; installation feature and you have to explicitly list a layer in the
86
   ;; variable `dotspacemacs-configuration-layers' to install it.
87
   ;; (default 'unused)
88
   dotspacemacs-enable-lazy-installation 'unused
89
   ;; If non-nil then Spacemacs will ask for confirmation before installing
90
   ;; a layer lazily. (default t)
91
   dotspacemacs-ask-for-lazy-installation t
92
   ;; If non-nil layers with lazy install support are lazy installed.
93
   ;; List of additional paths where to look for configuration layers.
94
   ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
95
   dotspacemacs-configuration-layer-path `(,(os-path "~/.emacs.d/layers/"))
96
   ;; List of configuration layers to load.
97
   dotspacemacs-configuration-layers (append
98
                                         dotspacemacs/layers/core
99
                                         dotspacemacs/layers/langs
100
                                         dotspacemacs/layers/extra)
101
   ;; List of additional packages that will be installed without being
102
   ;; wrapped in a layer. If you need some configuration for these
103
   ;; packages, then consider creating a layer. You can also put the
104
   ;; configuration in `dotspacemacs/user-config'.
105
   dotspacemacs-additional-packages '(
106
    markdown-mode
107
    ;;po-mode  ;;Commented until I find a way to disable the FUCKING ANNOYING READONLY MODE
108
    (pretty-mode :location (recipe :fetcher github :repo "akatov/pretty-mode"))
109
    (prettify-utils :location (recipe :fetcher github :repo "Ilazki/prettify-utils.el"))
110
    (company-mode :location (recipe :fetcher github :repo "company-mode/company-mode"))
111
    (emacs-ycmd :location (recipe :fetcher github :repo "abingham/emacs-ycmd"))
112
    (company-flx :location (recipe :fetcher github :repo "PythonNut/company-flx")))
113
114
   ;; A list of packages that cannot be updated.
115
   dotspacemacs-frozen-packages '()
116
   ;; A list of packages that will not be installed and loaded.
117
   dotspacemacs-excluded-packages '(
118
                                    smartparens
119
                                    exec-path-from-shell)
120
   ;; Defines the behaviour of Spacemacs when installing packages.
121
   ;; Possible values are `used-only', `used-but-keep-unused' and `all'.
122
   ;; `used-only' installs only explicitly used packages and uninstall any
123
   ;; unused packages as well as their unused dependencies.
124
   ;; `used-but-keep-unused' installs only the used packages but won't uninstall
125
   ;; them if they become unused. `all' installs *all* packages supported by
126
   ;; Spacemacs and never uninstall them. (default is `used-only')
127
   dotspacemacs-install-packages 'used-only))
128
129
(defun dotspacemacs/init ()
130
  "Initialization function.
131
This function is called at the very startup of Spacemacs initialization
132
before layers configuration.
133
You should not put any user code in there besides modifying the variable
134
values."
135
  ;; This setq-default sexp is an exhaustive list of all the supported
136
  ;; spacemacs settings.
137
  (setq-default
138
   ;; If non nil ELPA repositories are contacted via HTTPS whenever it's
139
   ;; possible. Set it to nil if you have no way to use HTTPS in your
140
   ;; environment, otherwise it is strongly recommended to let it set to t.
141
   ;; This variable has no effect if Emacs is launched with the parameter
142
   ;; `--insecure' which forces the value of this variable to nil.
143
   ;; (default t)
144
   dotspacemacs-elpa-https t
145
   ;; Maximum allowed time in seconds to contact an ELPA repository.
146
   dotspacemacs-elpa-timeout 5
147
   ;; If non nil then spacemacs will check for updates at startup
148
   ;; when the current branch is not `develop'. Note that checking for
149
   ;; new versions works via git commands, thus it calls GitHub services
150
   ;; whenever you start Emacs. (default nil)
151
   dotspacemacs-check-for-update nil
152
   ;; If non-nil, a form that evaluates to a package directory. For example, to
153
   ;; use different package directories for different Emacs versions, set this
154
   ;; to `emacs-version'.
155
   dotspacemacs-elpa-subdirectory nil
156
   ;; One of `vim', `emacs' or `hybrid'.
157
   ;; `hybrid' is like `vim' except that `insert state' is replaced by the
158
   ;; `hybrid state' with `emacs' key bindings. The value can also be a list
159
   ;; with `:variables' keyword (similar to layers). Check the editing styles
160
   ;; section of the documentation for details on available variables.
161
   ;; (default 'vim)
162
   dotspacemacs-editing-style 'vim
163
   ;; If non nil output loading progress in `*Messages*' buffer. (default nil)
164
   dotspacemacs-verbose-loading nil
165
   ;; Specify the startup banner. Default value is `official', it displays
166
   ;; the official spacemacs logo. An integer value is the index of text
167
   ;; banner, `random' chooses a random text banner in `core/banners'
168
   ;; directory. A string value must be a path to an image format supported
169
   ;; by your Emacs build.
170
   ;; If the value is nil then no banner is displayed. (default 'official)
171
   dotspacemacs-startup-banner 'official
172
   ;; List of items to show in startup buffer or an association list of
173
   ;; the form `(list-type . list-size)`. If nil then it is disabled.
174
   ;; Possible values for list-type are:
175
   ;; `recents' `bookmarks' `projects' `agenda' `todos'."
176
   ;; List sizes may be nil, in which case
177
   ;; `spacemacs-buffer-startup-lists-length' takes effect.
178
   dotspacemacs-startup-lists '((recents . 5)
179
                                (projects . 7))
180
   ;; True if the home buffer should respond to resize events.
181
   dotspacemacs-startup-buffer-responsive t
182
   ;; Default major mode of the scratch buffer (default `text-mode')
183
   dotspacemacs-scratch-mode 'text-mode
184
   ;; List of themes, the first of the list is loaded when spacemacs starts.
185
   ;; Press  T n to cycle to the next theme in the list (works great
186
   ;; with 2 themes variants, one dark and one light)
187
   dotspacemacs-themes '(monokai
188
                         solarized-dark
189
                         solarized-light)
190
   ;; If non nil the cursor color matches the state color in GUI Emacs.
191
   dotspacemacs-colorize-cursor-according-to-state t
192
   ;; Default font, or prioritized list of fonts. `powerline-scale' allows to
193
   ;; quickly tweak the mode-line size to make separators look not too crappy.
194
   dotspacemacs-default-font '("Hack"
195
                               :size 15
196
                               :weight normal
197
                               :width normal
198
                               :powerline-scale 1.5)
199
   ;; The leader key
200
   dotspacemacs-leader-key "SPC"
201
   ;; The key used for Emacs commands (M-x) (after pressing on the leader key).
202
   ;; (default "SPC")
203
   dotspacemacs-emacs-command-key "SPC"
204
   ;; The key used for Vim Ex commands (default ":")
205
   dotspacemacs-ex-command-key ":"
206
   ;; The leader key accessible in `emacs state' and `insert state'
207
   ;; (default "M-m")
208
   dotspacemacs-emacs-leader-key "M-m"
209
   ;; Major mode leader key is a shortcut key which is the equivalent of
210
   ;; pressing ` m`. Set it to `nil` to disable it. (default ",")
211
   dotspacemacs-major-mode-leader-key ","
212
   ;; Major mode leader key accessible in `emacs state' and `insert state'.
213
   ;; (default "C-M-m")
214
   dotspacemacs-major-mode-emacs-leader-key "C-M-m"
215
   ;; These variables control whether separate commands are bound in the GUI to
216
   ;; the key pairs C-i, TAB and C-m, RET.
217
   ;; Setting it to a non-nil value, allows for separate commands under 
218
   ;; and TAB or  and RET.
219
   ;; In the terminal, these pairs are generally indistinguishable, so this only
220
   ;; works in the GUI. (default nil)
221
   dotspacemacs-distinguish-gui-tab nil
222
   ;; If non nil `Y' is remapped to `y$' in Evil states. (default nil)
223
   dotspacemacs-remap-Y-to-y$ nil
224
   ;; If non-nil, the shift mappings `<' and `>' retain visual state if used
225
   ;; there. (default t)
226
   dotspacemacs-retain-visual-state-on-shift t
227
   ;; If non-nil, J and K move lines up and down when in visual mode.
228
   ;; (default nil)
229
   dotspacemacs-visual-line-move-text nil
230
   ;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
231
   ;; (default nil)
232
   dotspacemacs-ex-substitute-global nil
233
   ;; Name of the default layout (default "Default")
234
   dotspacemacs-default-layout-name "Default"
235
   ;; If non nil the default layout name is displayed in the mode-line.
236
   ;; (default nil)
237
   dotspacemacs-display-default-layout nil
238
   ;; If non nil then the last auto saved layouts are resume automatically upon
239
   ;; start. (default nil)
240
   dotspacemacs-auto-resume-layouts nil
241
   ;; Size (in MB) above which spacemacs will prompt to open the large file
242
   ;; literally to avoid performance issues. Opening a file literally means that
243
   ;; no major mode or minor modes are active. (default is 1)
244
   dotspacemacs-large-file-size 1
245
   ;; Location where to auto-save files. Possible values are `original' to
246
   ;; auto-save the file in-place, `cache' to auto-save the file to another
247
   ;; file stored in the cache directory and `nil' to disable auto-saving.
248
   ;; (default 'cache)
249
   dotspacemacs-auto-save-file-location 'cache
250
   ;; Maximum number of rollback slots to keep in the cache. (default 5)
251
   dotspacemacs-max-rollback-slots 5
252
   ;; If non nil, `helm' will try to minimize the space it uses. (default nil)
253
   dotspacemacs-helm-resize nil
254
   ;; if non nil, the helm header is hidden when there is only one source.
255
   ;; (default nil)
256
   dotspacemacs-helm-no-header nil
257
   ;; define the position to display `helm', options are `bottom', `top',
258
   ;; `left', or `right'. (default 'bottom)
259
   dotspacemacs-helm-position 'bottom
260
   ;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching
261
   ;; in all non-asynchronous sources. If set to `source', preserve individual
262
   ;; source settings. Else, disable fuzzy matching in all sources.
263
   ;; (default 'always)
264
   dotspacemacs-helm-use-fuzzy 'always
265
   ;; If non nil the paste micro-state is enabled. When enabled pressing `p`
266
   ;; several times cycle between the kill ring content. (default nil)
267
   dotspacemacs-enable-paste-transient-state nil
268
   ;; Which-key delay in seconds. The which-key buffer is the popup listing
269
   ;; the commands bound to the current keystroke sequence. (default 0.4)
270
   dotspacemacs-which-key-delay 0
271
   ;; Which-key frame position. Possible values are `right', `bottom' and
272
   ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
273
   ;; right; if there is insufficient space it displays it at the bottom.
274
   ;; (default 'bottom)
275
   dotspacemacs-which-key-position 'bottom
276
   ;; If non nil a progress bar is displayed when spacemacs is loading. This
277
   ;; may increase the boot time on some systems and emacs builds, set it to
278
   ;; nil to boost the loading time. (default t)
279
   dotspacemacs-loading-progress-bar t
280
   ;; If non nil the frame is fullscreen when Emacs starts up. (default nil)
281
   ;; (Emacs 24.4+ only)
282
   dotspacemacs-fullscreen-at-startup nil
283
   ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
284
   ;; Use to disable fullscreen animations in OSX. (default nil)
285
   dotspacemacs-fullscreen-use-non-native nil
286
   ;; des dired-mode
287
   ;;                       doc-view-mode
288
   ;;                       markdown-mode
289
   ;;                       org-mode
290
   ;;                       pdf-view-mode
291
   ;;                       text-mode
292
   ;;   :size-limit-kb 1000)
293
   ;; (default nil)
294
   dotspacemacs-line-numbers 'relative
295
   ;; Code folding method. Possible values are `evil' and `origami'.
296
   ;; (default 'evil)
297
   dotspacemacs-folding-method 'evil
298
   ;; If non-nil smartparens-strict-mode will be enabled in programming modes.
299
   ;; (default nil)
300
   dotspacemacs-smartparens-strict-mode nil
301
   ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
302
   ;; over any automatically added closing parenthesis, bracket, quote, etc…
303
   ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
304
   dotspacemacs-smart-closing-parenthesis nil
305
   ;; Select a scope to highlight delimiters. Possible values are `any',
306
   ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
307
   ;; emphasis the current one). (default 'all)
308
   dotspacemacs-highlight-delimiters 'all
309
   ;; If non nil, advise quit functions to keep server open when quitting.
310
   ;; (default nil)
311
   dotspacemacs-persistent-server nil
312
   ;; List of search tool executable names. Spacemacs uses the first installed
313
   ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
314
   ;; (default '("ag" "pt" "ack" "grep"))
315
   dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
316
   ;; The default package repository used if no explicit repository has been
317
   ;; specified with an installed package.
318
   ;; Not used for now. (default nil)
319
   dotspacemacs-default-package-repository nil
320
   ;; Delete whitespace while saving buffer. Possible values are `all'
321
   ;; to aggressively delete empty line and long sequences of whitespace,
322
   ;; `trailing' to delete only the whitespace at end of lines, `changed'to
323
   ;; delete only whitespace for changed lines or `nil' to disable cleanup.
324
   ;; (default nil)
325
   dotspacemacs-whitespace-cleanup nil
326
   ))
327
328
(defun dotspacemacs/user-init ()
329
  (add-hook 'text-mode-hook #'auto-fill-mode)
330
;;; Fira code
331
;; This works when using emacs --daemon + emacsclient
332
(add-hook 'after-make-frame-functions (lambda (frame) (set-fontset-font t '(#Xe100 . #Xe16f) "Fira Code Symbol")))
333
;; This works when using emacs without server/client
334
(set-fontset-font t '(#Xe100 . #Xe16f) "Fira Code Symbol")
335
;; I haven't found one statement that makes both of the above situations work, so I use both for now
336
337
;; All possible Fira code symbols. I've commented some for historical purposes,
338
;; and only left the ones I do want to see. They may be removed one day, but for
339
;; now, they'll stay here.
340
;; I generally only use the ones that actually give new symbols based on their
341
;; ligature. ";;" is just the same symbol mashed together, so I don't use that.
342
(defconst fira-code-font-lock-keywords-alist
343
  (mapcar (lambda (regex-char-pair)
344
            `(,(car regex-char-pair)
345
              (0 (prog1 ()
346
                   (compose-region (match-beginning 1)
347
                                   (match-end 1)
348
                                   ;; The first argument to concat is a string containing a literal tab
349
                                   ,(concat "	" (list (decode-char 'ucs (cadr regex-char-pair)))))))))
350
          '(;("[^/]\\(\\*\\*\\)[^/]"        #Xe101)
351
            ;("[^*]\\(\\*/\\)"              #Xe105)
352
            ;("\\(\\\\\\\\\\)"              #Xe106)
353
            ("\\({-\\)"                    #Xe108)
354
            ;("\\(\\[\\]\\)"                #Xe109)
355
            ;("[^=]\\(:=\\)"                #Xe10c)
356
            ("\\(!=\\)"                    #Xe10e)
357
            ("\\(!==\\)"                   #Xe10f)
358
            ("\\(-}\\)"                    #Xe110)
359
            ("\\(-->\\)"                   #Xe113)
360
            ("[^-]\\(->\\)"                #Xe114)
361
            ("\\(->>\\)"                   #Xe115)
362
            ("\\(-<\\)"                    #Xe116)
363
            ("\\(-<<\\)"                   #Xe117)
364
            ("\\(-~\\)"                    #Xe118)
365
            ("\\(\\.-\\)"                  #Xe122)
366
            ("\\(\\.=\\)"                  #Xe123)
367
            ("\\(/=\\)"                    #Xe12c)
368
            ("\\(/==\\)"                   #Xe12d)
369
            ("\\(|>\\)"                    #Xe135)
370
            ("[^!/]\\(==\\)[^>]"           #Xe13c)
371
            ("\\(===\\)"                   #Xe13d)
372
            ("\\(==>\\)"                   #Xe13e)
373
            ("[^=]\\(=>\\)"                #Xe13f)
374
            ("\\(=>>\\)"                   #Xe140)
375
            ("\\(<=\\)"                    #Xe141)
376
            ("\\(=<<\\)"                   #Xe142)
377
            ("\\(=/=\\)"                   #Xe143)
378
            ("\\(>-\\)"                    #Xe144)
379
            ("\\(>=\\)"                    #Xe145)
380
            ("\\(>=>\\)"                   #Xe146)
381
            ;("[^-=]\\(>>\\)"               #Xe147)
382
            ("\\(>>-\\)"                   #Xe148)
383
            ("\\(>>=\\)"                   #Xe149)
384
            ("\\(<|\\)"                    #Xe14d)
385
            ("\\(<|>\\)"                   #Xe14e)
386
            ("\\(<-\\)"                    #Xe152)
387
            ("\\(<--\\)"                   #Xe153)
388
            ("\\(<->\\)"                   #Xe154)
389
            ("\\(<=\\)"                    #Xe157)
390
            ("\\(<==\\)"                   #Xe158)
391
            ("\\(<=>\\)"                   #Xe159)
392
            ("\\(<=<\\)"                   #Xe15a)
393
            ("\\(<>\\)"                    #Xe15b)
394
            ;("[^-=]\\(<<\\)"               #Xe15c)
395
            ("\\(<<-\\)"                   #Xe15d)
396
            ("\\(<<=\\)"                   #Xe15e)
397
            ("\\(<<<\\)"                   #Xe15f)
398
            ("\\(<~\\)"                    #Xe160)
399
            ("\\(<~~\\)"                   #Xe161)
400
            ("\\(~@\\)"                    #Xe164)
401
            ("\\(~-\\)"                    #Xe165)
402
            ("\\(~=\\)"                    #Xe166)
403
            ("\\(~>\\)"                    #Xe167)
404
            ("[^<]\\(~~\\)"                #Xe168)
405
            ("\\(~~>\\)"                   #Xe169)
406
            ("[^:=]\\(:\\)[^:=]"           #Xe16c)
407
            ("[^\\+<>]\\(\\+\\)[^\\+<>]"   #Xe16d)
408
            ("[^\\*/<>]\\(\\*\\)[^\\*/<>]" #Xe16f))))
409
410
(defun add-fira-code-symbol-keywords ()
411
  (font-lock-add-keywords nil fira-code-font-lock-keywords-alist))
412
413
(add-hook 'prog-mode-hook
414
          #'add-fira-code-symbol-keywords)
415
  "Initialization function for user code.
416
It is called immediately after `dotspacemacs/init', before layer configuration
417
executes.
418
 This function is mostly useful for variables that need to be set
419
before packages are loaded. If you are unsure, you should try in setting them in
420
`dotspacemacs/user-config' first."
421
   )
422
423
(defun dotspacemacs/user-config ()
424
  ;; http://spacemacs.org/doc/DOCUMENTATION.html#powerline-separators
425
  (setq powerline-default-separator 'slant)
426
  ;; Make j and k behave like gj and gk (move visual line up/down)
427
  (define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
428
  (define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
429
430
431
  (require 'ycmd)
432
  (setq ycmd-force-semantic-completion t)
433
  (add-hook 'after-init-hook #'global-ycmd-mode)
434
  (set-variable 'ycmd-server-command '("python" "/home/simba/.emacs.d/ycmd/ycmd"))
435
  (set-variable 'ycmd-server-timeout 10)
436
  (set-variable 'ycmd-global-config "/home/simba/.ycm_extra_conf.py")
437
  (require 'company)
438
  (set-fill-column 80)
439
  ;; Settings for prettify-symbols-mode
440
  (global-prettify-symbols-mode 1)
441
  (add-hook 'clojure-mode-hook
442
    (lambda ()
443
      (mapc (lambda (pair) (push pair prettify-symbols-alist))
444
            '(
445
              ("infinity" .      ?∞)))))
446
  (add-hook 'python-mode-hook
447
   (lambda ()
448
     (mapc (lambda (pair) (push pair prettify-symbols-alist))
449
           '(;; Syntax
450
             ;("def" .      #x2131) ;; Enable when you figure out how to make it in a pretty font...
451
             ("not" .      #x2757)
452
             ("in" .       #x2208)
453
             ("not in" .   #x2209)
454
             ("return" .   #x27fc)
455
             ("yield" .    #x27fb)
456
             ("for" .      #x2200)
457
             ;; Base Types
458
             ("int" .      #x2124)
459
             ("float" .    #x211d)
460
             ("str" .      #x1d54a)
461
             ("True" .     #x1d54b)
462
             ("False" .    #x1d53d)
463
             ;; Mypy
464
             ;;("Dict" .     #x1d507)
465
             ("List" .     #x2112)
466
             ("Tuple" .    #x2a02)
467
             ("Set" .      #x2126)
468
             ("Iterable" . #x1d50a)
469
             ("Any" .      #x2754)
470
             ("Union" .    #x22c3)))))
471
  (add-hook 'haskell-mode-hook
472
            (lambda ()
473
              (mapc (lambda (pair) (push pair prettify-symbols-alist))
474
                    '(
475
                      ;;Number sets & other types
476
                      ("Float"      . ?ℝ)
477
                      ("Complex"    . ?ℂ)
478
                      ("Int"        . ?ℤ)
479
                      ("Fractional" . ?ℚ)
480
                      ("String"     . ?𝕊)
481
                      ("Bool"       . ?𝔹)
482
                      ;; Predefined ranges
483
                      ("[0..]"      . ? )
484
                      ("[1..]"      . ? )
485
                      ("[(-0),(-1)..]" . ? )
486
                      ("[(-1),(-2)..]" . ? )
487
                      ;; Operators
488
                      ;("*" .        ?✕)
489
                      ("*"          . ?·) ;; Because someone asked nicely <3
490
                      ;;Logic
491
                      ("True"       . ?𝕋)
492
                      ("False"      . ?𝔽)))))
493
  ;; A lot of Haskell's signs are provided through pretty-mode already
494
495
  (add-hook 'haskell-mode-hook 'turn-on-pretty-mode)
496
  (require 'pretty-mode) ;; Settings for pretty-mode
497
  (global-pretty-mode t)
498
  ;; These groups will be deactivated, and pretty-mode will not use these.
499
  ;; However, they're more useful than using Fira Code ligatures, and
500
  ;; pretty-mode has support for Haskell-mode, and uses the normal font (i.e. Hack)
501
  ;; To display the logic and symbol. So in the future, try to activate as much
502
  ;; groups as possible, and deactivate manually where it's appropriate, so I can
503
  ;; take full advantage of GNU Emacs' offerings.
504
  (pretty-deactivate-groups
505
   '(:equality :arrows :arrows-twoheaded))
506
   ;;'(:equality :ordering :ordering-double :ordering-triple
507
               ;;:arrows :arrows-twoheaded :punctuation
508
               ;;:logic :sets))
509
510
  (pretty-activate-groups
511
   '(:sub-and-superscripts :greek :arithmetic-nary))
512
513
  ;; Prettify-utils extra code
514
  (require 'prettify-utils)
515
  (defvar pretty-options
516
    (-flatten
517
    (prettify-utils-generate
518
      ;; Functional
519
      (:lambda      "λ") (:def         "ƒ")
520
      (:composition "∘")
521
522
      ;; Types
523
      (:null        "∅") (:true        "𝕋") (:false       "𝔽")
524
      (:int         "ℤ") (:float       "ℝ")
525
      (:str         "𝕊") (:bool        "𝔹")
526
527
      ;; Flow
528
      (:in          "∈") (:not-in      "∉")
529
      (:return     "⟼") (:yield      "⟻")
530
      (:and         "∧") (:or          "∨")
531
      (:not         "¬")
532
      (:for         "∀")
533
      (:some        "∃")
534
535
      ;; Other
536
      (:tuple       "⨂")
537
      (:pipe        "")
538
      ))
539
    "Options plist for `pretty-code-get-pairs'.")
540
541
  ;;; Core
542
543
  ;;;###autoload
544
  (defun pretty-code-get-pairs (KWDS)
545
    "Build an alist for prettify-symbols-alist from components from KWDS."
546
    (-non-nil
547
    (--map (when-let (major-mode-sym (plist-get KWDS it))
548
            `(,major-mode-sym
549
              ,(plist-get pretty-options it)))
550
          pretty-options)))
551
552
  ;;;###autoload
553
  (defun pretty-code-set-pairs (HOOK-PAIRS-ALIST)
554
    "Add hooks setting `prettify-symbols-alist' for many modes"
555
    (mapc (lambda (x)
556
            (lexical-let ((pretty-pairs (cadr x)))
557
              (add-hook (car x)
558
                        (lambda ()
559
                          (setq prettify-symbols-alist pretty-pairs)))))
560
          HOOK-PAIRS-ALIST))
561
562
  ;; Activate superior completion mode
563
  (require 'company)
564
  (company-tng-configure-default)
565
  ;; Because of a bug where Helm-bookmark-map is not loaded properly, this
566
  ;; workaround is suggested (https://github.com/syl20bnr/spacemacs/issues/9549);
567
  ;; Just (require 'helm-bookmark)
568
  (require 'helm-bookmark)
569
  ;; Settings for org-mode, copied from
570
  ;; https://github.com/jwiegley/newartisans/blob/master/posts/2007-08-20-using-org-mode-as-a-day-planner.md
571
  ;;(require 'org)
572
573
  (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
574
575
  (define-key mode-specific-map [?a] 'org-agenda)
576
577
  (eval-after-load "org"
578
    '(progn
579
      (define-prefix-command 'org-todo-state-map)
580
581
      (define-key org-mode-map "\C-cx" 'org-todo-state-map)
582
583
      (define-key org-todo-state-map "x"
584
        #'(lambda nil (interactive) (org-todo "CANCELED")))
585
      (define-key org-todo-state-map "d"
586
        #'(lambda nil (interactive) (org-todo "DONE")))
587
      (define-key org-todo-state-map "f"
588
        #'(lambda nil (interactive) (org-todo "DEFERRED")))
589
      (define-key org-todo-state-map "l"
590
        #'(lambda nil (interactive) (org-todo "DELEGATED")))
591
      (define-key org-todo-state-map "s"
592
        #'(lambda nil (interactive) (org-todo "STARTED")))
593
      (define-key org-todo-state-map "w"
594
        #'(lambda nil (interactive) (org-todo "WAITING")))
595
596
      ;;(define-key org-agenda-mode-map "\C-n" 'next-line)
597
      ;;(define-key org-agenda-keymap "\C-n" 'next-line)
598
      ;;(define-key org-agenda-mode-map "\C-p" 'previous-line)
599
      ;;(define-key org-agenda-keymap "\C-p" 'previous-line)
600
      ))
601
602
  ;;(require 'org-capture)
603
  ;; Bugfix: See https://github.com/IvanMalison/org-projectile/issues/31 for more
604
  ;; information.
605
  ;(defalias 'org-projectile-per-repo 'org-projectile-per-project)
606
607
  (add-hook 'capture-mode-hook 'org-capture-apply-template)
608
609
  (define-key global-map [(control meta ?r)] 'capture)
610
611
  (custom-set-variables
612
  '(org-agenda-files (quote ("~/shared/planning/planning.org")))
613
  '(org-default-notes-file "~/shared/planning/notes.org")
614
  '(org-agenda-span 30)
615
  '(org-deadline-warning-days 14)
616
  '(org-agenda-show-all-dates t)
617
  '(org-agenda-skip-deadline-if-done t)
618
  '(org-agenda-skip-scheduled-if-done t)
619
  '(org-agenda-start-on-weekday nil)
620
  '(org-reverse-note-order t)
621
  '(org-fast-tag-selection-single-key (quote expert))
622
  '(org-agenda-custom-commands
623
    (quote (("d" todo "DELEGATED" nil)
624
      ("c" todo "DONE|DEFERRED|CANCELED" nil)
625
      ("w" todo "WAITING" nil)
626
      ("W" agenda "" ((org-agenda-ndays 21)))
627
      ("A" agenda ""
628
        ((org-agenda-skip-function
629
          (lambda nil
630
      (org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]")))
631
        (org-agenda-ndays 1)
632
        (org-agenda-overriding-header "Today's Priority #A tasks: ")))
633
      ("u" alltodo ""
634
        ((org-agenda-skip-function
635
          (lambda nil
636
      (org-agenda-skip-entry-if (quote scheduled) (quote deadline)
637
              (quote regexp) "\n]+>")))
638
        (org-agenda-overriding-header "Unscheduled TODO entries: "))))))
639
  '(org-capture-store-without-prompt t)
640
  '(org-capture-templates
641
    (quote ((116 "* TODO %?\n  %u" "~/Repositories/private/org/planning.org" "Tasks")
642
      (110 "* %u %?" "~/Repositories/private/org/notes.org" "Notes"))))
643
  '(capture-annotation-functions (quote (org-capture-annotation)))
644
  '(capture-handler-functions (quote (org-capture-handler))))
645
646
  "Configuration function for user code.
647
This function is called at the very end of Spacemacs initialization after
648
layers configuration.
649
This is the place where most of your configurations should be done. Unless it is
650
explicitly specified that a variable should be set before a package is loaded,
651
you should place your code here."
652
  )
653
654
;; Do not write anything past this comment. This is where Emacs will
655
;; auto-generate custom variable definitions.
656
(custom-set-variables
657
 ;; custom-set-variables was added by Custom.
658
 ;; If you edit it by hand, you could mess it up, so be careful.
659
 ;; Your init file should contain only one such instance.
660
 ;; If there is more than one, they won't work right.
661
 '(capture-annotation-functions (quote (org-capture-annotation)))
662
 '(capture-handler-functions (quote (org-capture-handler)))
663
 '(evil-want-Y-yank-to-eol nil)
664
 '(org-agenda-custom-commands
665
   (quote
666
    (("d" todo "DELEGATED" nil)
667
     ("c" todo "DONE|DEFERRED|CANCELED" nil)
668
     ("w" todo "WAITING" nil)
669
     ("W" agenda ""
670
      ((org-agenda-ndays 21)))
671
     ("A" agenda ""
672
      ((org-agenda-skip-function
673
        (lambda nil
674
          (org-agenda-skip-entry-if
675
           (quote notregexp)
676
           "\\=.*\\[#A\\]")))
677
       (org-agenda-ndays 1)
678
       (org-agenda-overriding-header "Today's Priority #A tasks: ")))
679
     ("u" alltodo ""
680
      ((org-agenda-skip-function
681
        (lambda nil
682
          (org-agenda-skip-entry-if
683
           (quote scheduled)
684
           (quote deadline)
685
           (quote regexp)
686
           "
687
]+>")))
688
       (org-agenda-overriding-header "Unscheduled TODO entries: "))))))
689
 '(org-agenda-files (quote ("~/Repositories/private/org/planning.org")))
690
 '(org-agenda-show-all-dates t)
691
 '(org-agenda-skip-deadline-if-done t)
692
 '(org-agenda-skip-scheduled-if-done t)
693
 '(org-agenda-span 30)
694
 '(org-agenda-start-on-weekday nil)
695
 '(org-capture-store-without-prompt t)
696
 '(org-capture-templates
697
   (quote
698
    ((116 "* TODO %?
699
  %u" "~/Repositories/private/org/planning.org" "Tasks")
700
     (110 "* %u %?" "~/Repositories/private/org/notes.org" "Notes"))))
701
 '(org-deadline-warning-days 14)
702
 '(org-default-notes-file "~/Repositories/private/org/notes.org")
703
 '(org-fast-tag-selection-single-key (quote expert))
704
 '(org-reverse-note-order t)
705
 '(package-selected-packages
706
   (quote
707
    (mu4e-alert mu4e-maildirs-extension ht po-mode dash-functional iedit smartparens goto-chg projectile dash s company-ycmd company-flx emacs-ycmd evil helm helm-core avy org-plus-contrib async hydra company-mode flycheck-ycmd ycmd request-deferred let-alist deferred yaml-mode packed org-category-capture alert log4e gntp markdown-mode haml-mode gitignore-mode fringe-helper git-gutter+ git-gutter pos-tip flycheck magit magit-popup git-commit with-editor autothemer web-completion-data ghc haskell-mode company inflections edn multiple-cursors paredit peg cider queue clojure-mode yasnippet anaconda-mode pythonic auto-complete exec-path-from-shell zonokai-theme zenburn-theme zen-and-art-theme yapfify ws-butler winum which-key web-mode volatile-highlights vi-tilde-fringe uuidgen use-package underwater-theme ujelly-theme twilight-theme twilight-bright-theme twilight-anti-bright-theme tronesque-theme toxi-theme toc-org tao-theme tangotango-theme tango-plus-theme tango-2-theme tagedit sunny-day-theme sublime-themes subatomic256-theme subatomic-theme spaceline spacegray-theme soothe-theme solarized-theme soft-stone-theme soft-morning-theme soft-charcoal-theme smyx-theme smeargle slim-mode seti-theme scss-mode sass-mode reverse-theme restart-emacs rainbow-delimiters railscasts-theme pyvenv pytest pyenv-mode py-isort purple-haze-theme pug-mode professional-theme pretty-mode prettify-utils popwin planet-theme pip-requirements phoenix-dark-pink-theme phoenix-dark-mono-theme persp-mode pcre2el pastels-on-dark-theme paradox orgit organic-green-theme org-projectile org-present org-pomodoro org-download org-bullets open-junk-file omtose-phellack-theme oldlace-theme occidental-theme obsidian-theme noctilux-theme niflheim-theme neotree naquadah-theme mustang-theme move-text monokai-theme monochrome-theme molokai-theme moe-theme mmm-mode minimal-theme material-theme markdown-toc majapahit-theme magit-gitflow madhat2r-theme macrostep lush-theme lorem-ipsum live-py-mode linum-relative link-hint light-soap-theme less-css-mode jbeans-theme jazz-theme ir-black-theme intero inkpot-theme info+ indent-guide hy-mode hungry-delete htmlize hlint-refactor hl-todo hindent highlight-parentheses highlight-numbers highlight-indentation hide-comnt heroku-theme hemisu-theme help-fns+ helm-themes helm-swoop helm-pydoc helm-projectile helm-mode-manager helm-make helm-hoogle helm-gitignore helm-flx helm-descbinds helm-css-scss helm-company helm-c-yasnippet helm-ag hc-zenburn-theme haskell-snippets gruvbox-theme gruber-darker-theme graphviz-dot-mode grandshell-theme gotham-theme google-translate golden-ratio gnuplot gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe git-gutter-fringe+ gh-md gandalf-theme fuzzy flycheck-pos-tip flycheck-haskell flx-ido flatui-theme flatland-theme firebelly-theme fill-column-indicator farmhouse-theme fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-magit evil-lisp-state evil-indent-plus evil-iedit-state evil-exchange evil-escape evil-ediff evil-args evil-anzu espresso-theme emmet-mode elisp-slime-nav dumb-jump dracula-theme django-theme diff-hl define-word darktooth-theme darkokai-theme darkmine-theme darkburn-theme dakrone-theme cython-mode cyberpunk-theme csv-mode company-web company-statistics company-ghci company-ghc company-cabal company-anaconda column-enforce-mode color-theme-sanityinc-tomorrow color-theme-sanityinc-solarized cmm-mode clues-theme clojure-snippets clj-refactor clean-aindent-mode cider-eval-sexp-fu cherry-blossom-theme busybee-theme bubbleberry-theme birds-of-paradise-plus-theme badwolf-theme auto-yasnippet auto-highlight-symbol auto-compile apropospriate-theme anti-zenburn-theme ample-zen-theme ample-theme alect-themes aggressive-indent afternoon-theme adaptive-wrap ace-window ace-link ace-jump-helm-line ac-ispell))))
708
(custom-set-faces
709
 ;; custom-set-faces was added by Custom.
710
 ;; If you edit it by hand, you could mess it up, so be careful.
711
 ;; Your init file should contain only one such instance.
712
 ;; If there is more than one, they won't work right.
713
 '(default ((t (:background nil)))))