rc

Remove srefactor from init.el

Apparently it's supposed for "parsing C/C++ files"? Don't think that package has ever been useful for me so out it goes.

Author
Maarten Vangeneugden
Date
May 25, 2022, 2 p.m.
Hash
1aab7f75162b4eb3c39274ceb4334a549bd2e4a0
Parent
e89845fbf28e92faf51010e2e72521d38d06d8ae
Modified file
init.el

init.el

2 additions and 14 deletions.

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