rc

Remove pretty-mode from init.el

I used to like these symbols, still do actually. But they start annoying me more than being nice so they're going out as well.

Author
Maarten Vangeneugden
Date
May 25, 2022, 1:57 p.m.
Hash
e89845fbf28e92faf51010e2e72521d38d06d8ae
Parent
14d66cb466dae57b5bc66a0da85411328e467741
Modified file
init.el

init.el

2 additions and 48 deletions.

View changes Hide changes
1
-
;; Copyright © 2018 Maarten Vangeneugden
+
1
;; Copyright © 2018 Maarten Vangeneugden
2
2
;; Author: Maarten Vangeneugden <contact_me@maartenv.be>
3
3
;; URL: https://maartenv.be
4
4
;;
5
5
;; Welcome to Ghent Emacs.
6
6
;;
7
7
;; This is the configuration file for Ghent Emacs, a GNU Emacs derivative
8
8
;; developed in the city of Ghent, Belgium, by a student of Engineering
9
9
;; Informatics at Ghent University.
10
10
;;
11
11
;; License: GPLv3+
12
12
13
13
;; USAGE:
14
14
;; This configuration file uses the use-package declaration, that means the
15
15
;; settings are a bit different from what you'd normally do in a GNU Emacs
16
16
;; init.el file. Consult https://github.com/jwiegley/use-package for info on how
17
17
;; to correctly write package configuration.
18
18
19
19
(eval-when-compile
20
20
  (require 'use-package))
21
21
;(require 'diminish)                ;; if you use :diminish
22
22
(require 'bind-key)                ;; if you use any :bind variant
23
23
24
24
(custom-set-variables
25
25
 ;; custom-set-variables was added by Custom.
26
26
 ;; If you edit it by hand, you could mess it up, so be careful.
27
27
 ;; Your init file should contain only one such instance.
28
28
 ;; If there is more than one, they won't work right.
29
29
 '(custom-safe-themes
30
30
   '("78e6be576f4a526d212d5f9a8798e5706990216e9be10174e3f3b015b8662e27" "d9646b131c4aa37f01f909fbdd5a9099389518eb68f25277ed19ba99adeb7279" "8b58ef2d23b6d164988a607ee153fd2fa35ee33efc394281b1028c2797ddeebb" "f9aede508e587fe21bcfc0a85e1ec7d27312d9587e686a6f5afdbb0d220eab50" "83ae405e25a0a81f2840bfe5daf481f74df0ddb687f317b5e005aa61261126e9" "c433c87bd4b64b8ba9890e8ed64597ea0f8eb0396f4c9a9e01bd20a04d15d358" "a24c5b3c12d147da6cef80938dca1223b7c7f70f2f382b26308eba014dc4833a" "732b807b0543855541743429c9979ebfb363e27ec91e82f463c91e68c772f6e3" "a2cde79e4cc8dc9a03e7d9a42fabf8928720d420034b66aecc5b665bbf05d4e9" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "bd7b7c5df1174796deefce5debc2d976b264585d51852c962362be83932873d9" default))
31
31
 ;; When booting GNU Emacs, There's a startup screen with hyperlinks to fluffy
32
32
 ;; Emacs stuff. This isn't necessary so setting inhibit-startup-screen to t
33
33
 ;; blocks that from happening
34
34
 '(inhibit-startup-screen t)
35
35
 ;'(package-selected-packages
36
36
   ;'(clojure-mode company-ycmd pretty-mode smooth-scrolling company-flx rainbow-delimiters dante helm pretty-fonts company spaceline company-anaconda cider evil srefactor clang-format ycmd web-mode anaconda-mode use-package powerline monokai-theme general dashboard auto-package-update))
37
37
 '(powerline-default-separator 'slant nil nil "Customized with use-package spaceline")
38
38
 '(spaceline-inflation 1 t nil "Customized with use-package spaceline")
39
39
 '(spaceline-toggle-buffer-size-off nil t nil "Customized with use-package spaceline"))
40
40
;(custom-set-faces
41
41
 ;; custom-set-faces was added by Custom.
42
42
 ;; If you edit it by hand, you could mess it up, so be careful.
43
43
 ;; Your init file should contain only one such instance.
44
44
 ;; If there is more than one, they won't work right.
45
45
 ;'(default ((((class color) (min-colors 89)) (:foreground "#ffffff" :background "#263238")))))
46
46
 ;'(package-selected-packages
47
47
   ;(quote
48
48
	;(powerline rainbow-mode web-mode markdown-mode restart-emacs auctex clang-format evil auto-package-update rust-mode flycheck-rust company-anaconda anaconda-mode auctex-latexmk company-auctex tide general srefactor helm-gtags-mode helm-gtags ycmd org-ref org-bullets helm-projectile git-timemachine helm-tramp help-projectile fcitx which-key use-package monokai-theme rainbow-delimiters neotree helm flycheck evil-magit dashboard company ace-popup-menu)))
49
49
50
50
;; To get rid of those FUCKING ANNOYING BACKUP FILES FUCKING HELL DUDE
51
51
(setq backup-directory-alist '(("." . "~/.emacs.d/backup"))
52
52
  backup-by-copying t    ; Don't delink hardlinks
53
53
  version-control t      ; Use version numbers on backups
54
54
  delete-old-versions t  ; Automatically delete excess backups
55
55
  kept-new-versions 20   ; how many of the newest versions to keep
56
56
  kept-old-versions 5    ; and how many of the old
57
57
  )
58
58
;; And yes I copied it from SO, suck it: https://stackoverflow.com/questions/2680389/how-to-remove-all-files-ending-with-made-by-emacs
59
59
60
60
;; Disables the use of tabs, replaces them with spaces
61
61
(setq-default indent-tabs-mode nil)
62
62
63
63
;; Activate UTF-8 throughout Ghent Emacs
64
64
(prefer-coding-system 'utf-8)
65
65
(set-default-coding-systems 'utf-8)
66
66
(set-terminal-coding-system 'utf-8)
67
67
(set-keyboard-coding-system 'utf-8)
68
68
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
69
69
70
70
;; Line numbering config
71
71
(global-display-line-numbers-mode)
72
72
(setq display-line-numbers-mode t)
73
73
(setq display-line-numbers-widen t)
74
74
(setq display-line-numbers-type 'relative)
75
75
(setq display-line-numbers-current-absolute t)
76
76
77
77
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1)))
78
78
(setq scroll-step 1)
79
79
(setq scroll-margin 10) ;; Keeps 10 lines above and down always visible if still left
80
80
81
81
;; Enable line breaks in all modes at column 80
82
82
(setq-default auto-fill-function 'do-auto-fill)
83
83
(setq-default fill-column 80)
84
84
85
85
(setq ring-bell-function 'ignore) ;; Disables the FUCKING ANNOYING BEEPS HOLY SHIT
86
86
87
87
;; Setup packages
88
88
;(package-initialize)
89
89
(require 'package)
90
90
(setq package-enable-at-startup nil)
91
91
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/"))
92
92
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
93
93
(unless (package-installed-p 'use-package)
94
94
  (package-refresh-contents)
95
95
(package-install 'use-package))
96
96
97
97
(setq use-package-always-ensure t)
98
98
99
99
100
100
101
101
102
102
;; Next two lines allow foregoing :ensure t on all packages
103
103
;; :ensure t simply makes sure that, if a package isn't installed on this
104
104
;; machine, it's automatically fetched and installed.
105
105
;; This doesn't keep packages up-to-date, cfr. auto-package-update for that
106
106
(require 'use-package-ensure)
107
107
(setq use-package-always-ensure t)
108
108
109
109
;; Package for automatic updating of all the other packages
110
110
(use-package auto-package-update
111
111
  :config
112
112
  (setq auto-package-update-delete-old-versions t)
113
113
  (setq auto-package-update-hide-results t)
114
114
  (auto-package-update-maybe))
115
115
116
116
;; Easier keybindings so we can do more lazy loading
117
117
(use-package general
118
118
  :ensure t
119
119
  :config
120
120
  (general-create-definer my-leader-def
121
121
	;; :prefix my-leader
122
122
	:prefix "SPC")
123
123
  (general-create-definer local-leader-def
124
124
	;; :prefix local-leader
125
125
	:prefix ","))
126
126
127
127
(use-package dashboard
128
128
  :init
129
129
  (setq dashboard-banner-logo-title "") ; It's nicer to just not have a title text.
130
130
  (setq dashboard-startup-banner "~/ghent-emacs.png")
131
131
  :config
132
132
  (dashboard-setup-startup-hook))
133
133
134
134
;; AUCTeX configuration
135
135
;; Partly inspired by https://piotr.is/2010/emacs-as-the-ultimate-latex-editor/
136
136
;;;;(use-package auctex
137
137
  ;;:init
138
138
  ;;(setq TeX-auto-save t)
139
139
  ;;(setq TeX-parse-self t)
140
140
  ;;(setq Tex-save-query nil)
141
141
  ;;)
142
142
143
143
;; Updates all packages automatically
144
144
(use-package auto-package-update
145
145
  :config
146
146
  (setq auto-package-update-delete-old-versions t)
147
147
  (setq auto-package-update-hide-results t)
148
148
  (auto-package-update-maybe))
149
149
150
150
;; UI settings
151
151
(tool-bar-mode -1)
152
152
(menu-bar-mode -1)
153
153
(toggle-scroll-bar -1)
154
154
155
155
;; Tabs and width
156
156
(setq-default tab-width 4)
157
157
(setq-default c-basic-offset 4)
158
158
159
159
(use-package spaceline
160
160
    :init
161
161
    (setq frame-char-height 35)
162
162
    (setq powerline-height 35)
163
163
    :custom
164
164
     (spaceline-toggle-buffer-size-off)
165
165
     ;(setq powerline-height 21)
166
166
  (spaceline-inflation 1)
167
167
  (powerline-default-separator 'slant)
168
168
  :config
169
169
  (spaceline-spacemacs-theme)
170
170
  (setq spaceline-highlight-face-func 'spaceline-highlight-face-evil-state)) 
171
171
172
172
173
173
(use-package monokai-theme
174
174
    :init
175
-
    (load-theme 'monokai)
176
-
    :config
177
175
    (setq monokai-variable-pitch-mode t))
+
176
    (setq monokai-variable-pitch-mode t))
178
177
;; When using solarized as theme, put in :config
179
178
;; (setq x-underline-at-descent-line t)
180
179
;; Which will block an ugly line being drawn trhough the modeline.
181
180
182
181
;(add-hook 'org-mode-hook '(lambda () (setq fill-column 80)))
183
182
;(add-hook 'org-mode-hook 'auto-fill-mode)
184
183
;; (Programming) languages
185
184
186
185
187
186
188
187
(use-package dante
189
188
  :ensure t
190
189
  :after haskell-mode
191
190
  :commands 'dante-mode
192
191
  :init
193
192
  (add-hook 'haskell-mode-hook 'dante-mode)
194
193
  (add-hook 'haskell-mode-hook 'flycheck-mode))
195
194
196
195
    
197
196
;; HTML/CSS/Django
198
197
(use-package web-mode
199
198
  :ensure t
200
199
  :mode "\\.html?\\.djhtml\\'"
201
200
  :init
202
201
  (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
203
202
  (setq web-mode-markup-indent-offset 4)
204
203
  (setq web-mode-css-indent-offset 4)
205
204
  (setq web-mode-code-indent-offset 4)
206
205
  ;(setq web-mode-engines-alist
207
206
;	'(("django"    . "\\.html\\"))) ;; FIXME this doesn't work yet. IDK why.
208
207
  :custom ;; Next lines disable all the automatic completion stuff that I didn't explicitely ask for
209
208
  (web-mode-enable-auto-pairing nil)
210
209
  (web-mode-enable-auto-closing nil)
211
210
  (web-mode-enable-auto-expanding nil)
212
211
  (web-mode-enable-auto-opening nil)
213
212
  (web-mode-enable-auto-quoting nil))
214
213
215
214
(use-package ycmd-mode
216
215
  :ensure ycmd
217
216
  ;:hook (after-init . global-ycmd-mode)
218
217
  :hook (haskell-mode elisp-mode python-mode c-mode c++-mode) ; Add the modes of the languages where YCM
219
218
                                      ; needs to kick in
220
219
  :init
221
220
  ; Old paths
222
221
  ;(set-variable 'ycmd-server-command `("/usr/bin/python" ,(file-truename "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/")))
223
222
  ;(set-variable 'ycmd-global-config "/home/simba/.emacs.d/lang/ycm_conf.py")
224
223
  (set-variable 'ycmd-server-command `("python" ,(file-truename "~/ycmd/ycmd")))
225
224
  (set-variable 'ycmd-global-config (file-truename "~/Repositories/rc/.ycm_extra_conf.py"))
226
225
  (set-variable 'ycmd-global-modes 'all) ; Activates YCMD in 'all' major modes,
227
226
                                        ; not only those in ycmd-file-type-map
228
227
  ;(set-variable 'ycmd-extra-conf-whitelist '("/home/jorrit/Dev/*"))
229
228
  :config
230
229
  (setq url-show-status nil)  ; Makes those FUCKING annoying messages SHUT THE HELL UP
231
230
  (setq request-message-level -1)
232
231
  
233
232
  (use-package flycheck-ycmd
234
233
	:ensure t
235
234
	:commands (flycheck-ycmd-setup)
236
235
	:hook (ycmd-mode . flycheck-ycmd-setup)
237
236
	:init
238
237
	(setq flycheck-clang-language-standard "c++11")
239
238
	(when (not (display-graphic-p))
240
239
      (setq flycheck-indication-mode nil))))
241
240
242
241
(use-package company
243
242
 :hook (after-init . global-company-mode)
244
243
 :init
245
244
 (company-tng-configure-default)  ; Use <TAB> to scroll in completion options
246
245
 (setq company-minimum-prefix-length 2)
247
246
 (setq company-idle-delay 0.0)
248
247
 :config
249
248
 (use-package company-ycmd-mode
250
249
	:ensure company-ycmd
251
250
	:commands (company-ycmd-setup)
252
251
	:hook (ycmd-mode . company-ycmd-setup))
253
252
 (use-package company-flx
254
253
              :ensure t
255
254
              :config
256
255
              (company-flx-mode +1)))
257
256
258
257
(use-package clang-format
259
258
  :ensure t
260
259
  :general
261
260
  (local-leader-def
262
261
   :states 'normal
263
262
   :modes '(c-mode-map c++-mode-map)
264
263
   "b" '(:ignore t :which-key "clang")
265
264
   "bf" 'clang-format-buffer)
266
265
  :init
267
266
  (setq-default clang-format-style "{BasedOnStyle: llvm, IndentWidth: 4}"))
268
267
269
268
(use-package srefactor
270
269
  :ensure t
271
270
  :commands (srefactor-refactor-at-point)
272
271
  :hook ((c-mode c++-mode) . semantic-mode)
273
272
  :general
274
273
  (local-leader-def
275
274
   :states 'normal
276
275
   :keymaps '(c++-mode-map c-mode-map)
277
276
   "r" 'srefactor-refactor-at-point))
278
277
279
278
;; eViL-mode
280
279
(use-package evil
281
280
  :hook (after-init . evil-mode)
282
281
  :bind (:map evil-normal-state-map ;; Scrolls over lines correctly
283
282
              ("j" . evil-next-visual-line)
284
283
              ("k" . evil-previous-visual-line))
285
284
  :general
286
285
  (my-leader-def
287
286
	:states 'normal
288
287
    "b" '(:ignore t :which-key "buffer")
289
288
    "g" '(:ignore t :which-key "magit")
290
289
    "f" '(:ignore t :which-key "files")
291
290
	"bk" 'kill-this-buffer
292
291
	"bd" 'kill-other-buffers
293
292
	"bh" 'switch-to-home-buffer
294
293
	"br" 'revert-buffer
295
294
	"h" 'split-window-vertically
296
295
	"v" 'split-window-horizontally)
297
296
  (local-leader-def
298
297
	:states 'normal
299
298
    ;; General lang options
300
299
	"c" 'compile)
301
300
  :init
302
301
  (setq evil-find-skip-newlines t) ;; Allows f/F/t/T to search beyond CR/LF
303
302
  (setq evil-set-undo-system 'undo-tree) ;; Sets EViL up to use undo (after a
304
303
  ;; weird 2020 patch)
305
304
  (setq evil-want-C-u-scroll t)) ;; Activates c-u scroll to above.
306
305
307
306
;; About smooth-scrolling: I'd normally just use some variables for scrolling
308
307
;; but they all fail with org-mode. This package fixes everything that's wrong for me.
309
308
(use-package smooth-scrolling
310
309
   :config
311
310
   (smooth-scrolling-mode 1))
312
311
313
312
(use-package org
314
313
  :ensure t
315
314
  :pin "org"
316
315
  ; FIXME This causes some errors with bind-keys or what have you. Commented
317
316
  ; until it is fixed.
318
317
  ;:bind (:bind-keymap
319
318
  ;        ("C-c x" . org-todo-state-map)
320
319
  ;       :map org-todo-state-map
321
320
  ;        ("x" . #'(lambda nil (interactive) (org-todo "CANCELLED")))
322
321
  ;        ("d" . #'(lambda nil (interactive) (org-todo "DONE")))
323
322
  ;        ("f" . #'(lambda nil (interactive) (org-todo "DEFERRED")))
324
323
  ;        ("l" . #'(lambda nil (interactive) (org-todo "DELEGATED")))
325
324
  ;        ("s" . #'(lambda nil (interactive) (org-todo "STARTED")))
326
325
  ;        ("w" . #'(lambda nil (interactive) (org-todo "WAITING"))))
327
326
;         :map org-mode-map
328
327
;          ("C-c x" . org-todo-state-map))
329
328
   :init
330
329
  (define-key mode-specific-map [?a] 'org-agenda)
331
330
  :custom
332
331
  ;; Because I use XeLaTeX (it's objectively better), some variables need to be
333
332
  ;; set so org-mode knows what to call.
334
333
335
334
  ;; Okay, so you cán export asynchronous so compiling your PDF doesn't lock up
336
335
  ;; the editor completely, but for one reason or another, you MUST set the
337
336
  ;; async-debug to nil. Otherwise it will constantly "exit abnormally" without
338
337
  ;; reason. This fixes it, who knows why.
339
338
  (org-export-async-debug nil)
340
339
  
341
340
  (org-latex-compiler 'xelatex)  ; Makes sure the XeLaTeX compiler is used
342
341
  
343
342
  ; Tells Org to use dvisvgm because dvipng does not support XeLaTeX's output format
344
343
  (org-preview-latex-default-process 'dvisvgm)
345
344
  
346
345
  ; This edits the preview process so it works correctly with XeLaTeX.
347
346
  ; Changes: 
348
347
  ; - "latex" to "xelatex" 
349
348
  ; - Added the "-no-pdf" flag so it prints an XDV file instead of PDF.
350
349
  ; - change input type from dvi to xdv
351
350
  ; - Only leave the dvisvgm option because I don't need the others
352
351
  (org-preview-latex-process-alist
353
352
   (quote
354
353
    ((dvisvgm :programs
355
354
              ("xelatex" "dvisvgm")
356
355
              :description "dvi > svg" :message "you need to install the programs: xelatex and dvisvgm." :use-xcolor t :image-input-type "xdv" :image-output-type "svg" :image-size-adjust
357
356
              (1.7 . 1.5)
358
357
              :latex-compiler
359
358
              ("xelatex -interaction nonstopmode -no-pdf -output-directory %o %f")
360
359
              :image-converter
361
360
              ("dvisvgm %f -n -b min -c %S -o %O")))))
362
361
363
362
  ;; Sets the formatting options. I only changed :scale to 1.6, but I don't know
364
363
  ;; how to change only thát, so for now I'm configuring the entire variable
365
364
  (org-format-latex-options (quote
366
365
   (:foreground default :background default :scale 1.6 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers
367
366
             ("begin" "$1" "$" "$$" "\\(" "\\["))))
368
367
    
369
368
  ;; Sets the directory in which the preview fragments are stored to the /tmp
370
369
  ;; folder. Otherwise it clutters up the folder in which the source resides
371
370
  ;; with what are essentially cache files.
372
371
  (org-preview-latex-image-directory "/tmp/ltximg/")
373
372
  
374
373
  ;; Following customizations are in regard to org-agenda configuration.
375
374
  (org-agenda-files (quote ("~/shared/planning/planning.org")))
376
375
  (org-default-notes-file "~/shared/planning/notes.org")
377
376
  (org-agenda-span 62)
378
377
  (org-deadline-warning-days 14)
379
378
  (org-agenda-show-all-dates t)
380
379
  (org-agenda-skip-deadline-if-done t)
381
380
  (org-agenda-skip-scheduled-if-done t)
382
381
  (org-agenda-start-on-weekday nil)
383
382
  (org-reverse-note-order t)
384
383
  (org-fast-tag-selection-single-key (quote expert))
385
384
  (org-agenda-custom-commands
386
385
    (quote (("d" todo "DELEGATED" nil)
387
386
      ("c" todo "DONE|DEFERRED|CANCELED" nil)
388
387
      ("w" todo "WAITING" nil)
389
388
      ("W" agenda "" ((org-agenda-ndays 21)))
390
389
      ("A" agenda ""
391
390
        ((org-agenda-skip-function
392
391
          (lambda nil
393
392
      (org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]")))
394
393
        (org-agenda-ndays 1)
395
394
        (org-agenda-overriding-header "Today's Priority #A tasks: ")))
396
395
      ("u" alltodo ""
397
396
        ((org-agenda-skip-function
398
397
          (lambda nil
399
398
      (org-agenda-skip-entry-if (quote scheduled) (quote deadline)
400
399
              (quote regexp) "\n]+>")))
401
400
        (org-agenda-overriding-header "Unscheduled TODO entries: "))))))
402
401
  (org-capture-store-without-prompt t)
403
402
  (org-capture-templates
404
403
    (quote ((116 "* TODO %?\n  %u" "~/Repositories/private/org/planning.org" "Tasks")
405
404
      (110 "* %u %?" "~/Repositories/private/org/notes.org" "Notes"))))
406
405
  (capture-annotation-functions (quote (org-capture-annotation)))
407
406
  (capture-handler-functions (quote (org-capture-handler))))
408
407
409
408
  ;:general
410
409
  ;(local-leader-def
411
410
  ;  :states 'normal
412
411
  ;  :keymaps 'org-mode-map
413
412
;	"e" 'org-export-dispatch
414
413
;	"x" 'org-table-export
415
414
;	"." 'org-time-stamp
416
415
;	"t" 'org-twbs-export-to-html
417
416
;	"s" 'org-schedule
418
417
;	"d" 'org-deadline
419
418
;	"'" 'org-edit-special)
420
419
;  :config
421
420
;  ;; log todo items with timestamp
422
421
;  (setq org-log-done 'time))
423
422
424
423
;; XXX: I've opted not to use Cider for now because Clojure-mode and Company
425
424
;; already give enough completion and fast enough that I don't really feel like
426
425
;; I need this for now. I'll add it later when it's more useful.
427
426
(use-package cider
428
-
  :ensure t)
429
-
;  :ensure t
430
-
;  :hook clojure-mode)
431
-
  ;:mode "\\.clj\\'")
432
-
;; TODO See what can be deleted from helm config while still having all the
433
-
;; wanted functionality
434
-
(use-package helm
435
427
  :ensure t
436
428
  :hook (after-init . helm-mode)
437
429
  :commands (helm-autoresize-mode)
438
430
  :init
439
431
  ;; (defvar helm-google-suggest-use-curl-p)
440
432
  (defvar helm-ff-search-library-in-sexp)
441
433
  (defvar helm-echo-input-in-header-line)
442
434
  (defvar helm-ff-file-name-history-use-recentf)
443
435
  :general
444
436
  (general-define-key
445
437
   "M-x" 'helm-M-x
446
438
   "M-:" 'helm-eval-expression
447
439
   "C-c h" 'helm-command-prefix)
448
440
  (general-define-key
449
441
   :keymaps 'helm-map
450
442
   "<tab>" 'helm-execute-persistent-action
451
443
   "C-i" 'helm-execute-persistent-action
452
444
   "C-z" 'helm-select-action)
453
445
  (my-leader-def
454
446
	:states 'normal
455
447
	"bb" 'helm-buffers-list
456
448
	"ff" 'helm-find-files
457
449
	"p" 'helm-show-kill-ring)
458
450
  :config
459
451
  (setq helm-split-window-inside-p           t ; open helm buffer inside current window, not occupy whole other window
460
452
	helm-move-to-line-cycle-in-source     t ; move to end or beginning of source when reaching top or bottom of source.
461
453
	helm-ff-search-library-in-sexp        t ; search for library in `require' and `declare-function' sexp.
462
454
	helm-scroll-amount                    8 ; scroll 8 lines other window using m-<next>/m-<prior>
463
455
	helm-ff-file-name-history-use-recentf t
464
456
	helm-echo-input-in-header-line t)
465
457
466
458
  ;; hide some autogenerated files from helm
467
459
  (setq helm-ff-skip-boring-files t)
468
460
  ;; (add-to-list 'helm-boring-file-regexp-list "\\~$")
469
461
  
470
462
  (setq helm-autoresize-max-height 0)
471
463
  (setq helm-autoresize-min-height 20)
472
464
  (helm-autoresize-mode 1))
473
465
474
466
475
467
(use-package rainbow-delimiters
476
468
  :hook (prog-mode . rainbow-delimiters-mode))
477
469
478
470
;; Font settings, ligatures and symbol config
479
471
(set-frame-font "Hack 13" nil t)
480
472
481
473
(use-package pretty-mode
482
-
    :ensure t
483
-
    :init
484
-
    (global-pretty-mode t)
485
-
    (pretty-deactivate-groups
486
-
     '(:equality :ordering :ordering-double :ordering-triple
487
-
                 :arrows :arrows-twoheaded :punctuation
488
-
                 :logic :sets))
489
-
    (pretty-activate-groups
490
-
     '(:sub-and-superscripts :greek :arithmetic-nary)))
491
-
(global-prettify-symbols-mode 1)
492
-
(add-hook
493
-
 'python-mode-hook
494
-
 (lambda ()
495
-
   (mapc (lambda (pair) (push pair prettify-symbols-alist))
496
-
         '(;; Syntax
497
-
           ("def" .      #x2131)
498
-
           ("not" .      #x2757)
499
-
           ("in" .       #x2208)
500
-
           ("not in" .   #x2209)
501
-
           ("return" .   #x27fc)
502
-
           ("yield" .    #x27fb)
503
-
           ("for" .      #x2200)
504
-
           ;; Base Types
505
-
           ("int" .      #x2124)
506
-
           ("float" .    #x211d)
507
-
           ("str" .      #x1d54a)
508
-
           ("True" .     #x1d54b)
509
-
           ("False" .    #x1d53d)
510
-
           ;; Mypy
511
-
           ("Dict" .     #x1d507)
512
-
           ("List" .     #x2112)
513
-
           ("Tuple" .    #x2a02)
514
-
           ("Set" .      #x2126)
515
-
           ("Iterable" . #x1d50a)
516
-
           ("Any" .      #x2754)
517
-
           ("Union" .    #x22c3)))))
518
-
519
-
;; Settings for having an LaTeX beamer class export tool
520
474
(unless (boundp 'org-export-latex-classes)
521
475
(setq org-export-latex-classes nil))
522
476
(add-to-list 'org-export-latex-classes
523
477
;; beamer class, for presentations
524
478
'("beamer"
525
479
    "\\documentclass[11pt]{beamer}\n
526
480
    \\mode<{{{beamermode}}}>\n
527
481
    \\usetheme{{{{beamertheme}}}}\n
528
482
    \\usecolortheme{{{{beamercolortheme}}}}\n
529
483
    \\beamertemplateballitem\n
530
484
    \\setbeameroption{show notes}
531
485
    \\usepackage[utf8]{inputenc}\n
532
486
    \\usepackage[T1]{fontenc}\n
533
487
    \\usepackage{hyperref}\n
534
488
    \\usepackage{color}
535
489
    \\usepackage{listings}
536
490
    \\lstset{numbers=none,language=[ISO]C++,tabsize=4,
537
491
frame=single,
538
492
basicstyle=\\small,
539
493
showspaces=false,showstringspaces=false,
540
494
showtabs=false,
541
495
keywordstyle=\\color{blue}\\bfseries,
542
496
commentstyle=\\color{red},
543
497
}\n
544
498
    \\usepackage{verbatim}\n
545
499
    \\institute{{{{beamerinstitute}}}}\n          
546
500
    \\subject{{{{beamersubject}}}}\n"
547
501
548
502
    ("\\section{%s}" . "\\section*{%s}")
549
503
550
504
    ("\\begin{frame}[fragile]\\frametitle{%s}"
551
505
    "\\end{frame}"
552
506
    "\\begin{frame}[fragile]\\frametitle{%s}"
553
507
    "\\end{frame}")))
554
508
555
509
;; Adds a letter class, for formal letters
556
510
557
511
(add-to-list 'org-export-latex-classes
558
512
559
513
'("letter"
560
514
    "\\documentclass[11pt]{letter}\n
561
515
    \\usepackage[utf8]{inputenc}\n
562
516
    \\usepackage[T1]{fontenc}\n
563
517
    \\usepackage{color}"
564
518
565
519
    ("\\section{%s}" . "\\section*{%s}")
566
520
    ("\\subsection{%s}" . "\\subsection*{%s}")
567
521
    ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
568
522
    ("\\paragraph{%s}" . "\\paragraph*{%s}")
569
523
    ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
570
524
571
525
572
526
;(require 'ycmd)
573
527
;(add-hook 'after-init-hook #'global-ycmd-mode)
574
528
(custom-set-faces
575
529
 ;; custom-set-faces was added by Custom.
576
530
 ;; If you edit it by hand, you could mess it up, so be careful.
577
531
 ;; Your init file should contain only one such instance.
578
532
 ;; If there is more than one, they won't work right.
579
533
 )
580
534