rc

Fix bug with font setting in init.el

Author
Maarten Vangeneugden
Date
May 27, 2022, 2:55 p.m.
Hash
156d1e416c882c2365c0a983415467ad8320416e
Parent
1f636fae8039c45c6b90451407fe2afb9a34fe38
Modified file
init.el

init.el

5 additions and 11 deletions.

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