rc

Add '_' as word character to Haskell mode hook

For more information about why I had to manually do this, see https://evil.readthedocs.io/en/latest/faq.html#underscore-is-not-a-word-character

Author
Maarten Vangeneugden
Date
Sept. 15, 2024, 3:47 p.m.
Hash
d8fd1df30e145c60dbe0ad775b5aca18398c064a
Parent
9fe7e11018181ecc3b9469f9079a5f1ce4f5344a
Modified file
init.el

init.el

4 additions and 1 deletion.

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