rc

Remove clojure-mode and Cider

I don't really use Clojure that much lately, so I removed the related packages. I can add it back later, but since I'm cleaning out my init.el I thought it would be a good start to eliminate packages I don't need anymore.
Also, moved (load-theme 'monokai) to the :config.

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

init.el

0 additions and 13 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
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
175
    (load-theme 'monokai)
176
176
    :config
177
177
    (setq monokai-variable-pitch-mode t))
178
178
;; When using solarized as theme, put in :config
179
179
;; (setq x-underline-at-descent-line t)
180
180
;; Which will block an ugly line being drawn trhough the modeline.
181
181
182
182
;(add-hook 'org-mode-hook '(lambda () (setq fill-column 80)))
183
183
;(add-hook 'org-mode-hook 'auto-fill-mode)
184
184
;; (Programming) languages
185
185
186
186
187
187
188
188
(use-package dante
189
189
  :ensure t
190
190
  :after haskell-mode
191
191
  :commands 'dante-mode
192
192
  :init
193
193
  (add-hook 'haskell-mode-hook 'dante-mode)
194
194
  (add-hook 'haskell-mode-hook 'flycheck-mode))
195
195
196
196
(use-package clojure-mode
197
-
  :ensure t
198
-
  )
199
-
;(use-package anaconda-mode
200
-
  ;:ensure t
201
-
  ;:hook python-mode
202
-
  ;:config
203
-
  ;(use-package company-anaconda
204
-
    ;:ensure t
205
-
    ;:config
206
-
    ;(eval-after-load "company"
207
-
      ;'(add-to-list 'company-backends 'company-anaconda))))
208
-
  
209
-
    
210
197
;; HTML/CSS/Django
211
198
(use-package web-mode
212
199
  :ensure t
213
200
  :mode "\\.html?\\.djhtml\\'"
214
201
  :init
215
202
  (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
216
203
  (setq web-mode-markup-indent-offset 4)
217
204
  (setq web-mode-css-indent-offset 4)
218
205
  (setq web-mode-code-indent-offset 4)
219
206
  ;(setq web-mode-engines-alist
220
207
;	'(("django"    . "\\.html\\"))) ;; FIXME this doesn't work yet. IDK why.
221
208
  :custom ;; Next lines disable all the automatic completion stuff that I didn't explicitely ask for
222
209
  (web-mode-enable-auto-pairing nil)
223
210
  (web-mode-enable-auto-closing nil)
224
211
  (web-mode-enable-auto-expanding nil)
225
212
  (web-mode-enable-auto-opening nil)
226
213
  (web-mode-enable-auto-quoting nil))
227
214
228
215
(use-package ycmd-mode
229
216
  :ensure ycmd
230
217
  ;:hook (after-init . global-ycmd-mode)
231
218
  :hook (haskell-mode elisp-mode python-mode c-mode c++-mode) ; Add the modes of the languages where YCM
232
219
                                      ; needs to kick in
233
220
  :init
234
221
  ; Old paths
235
222
  ;(set-variable 'ycmd-server-command `("/usr/bin/python" ,(file-truename "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/")))
236
223
  ;(set-variable 'ycmd-global-config "/home/simba/.emacs.d/lang/ycm_conf.py")
237
224
  (set-variable 'ycmd-server-command `("python" ,(file-truename "~/ycmd/ycmd")))
238
225
  (set-variable 'ycmd-global-config (file-truename "~/Repositories/rc/.ycm_extra_conf.py"))
239
226
  (set-variable 'ycmd-global-modes 'all) ; Activates YCMD in 'all' major modes,
240
227
                                        ; not only those in ycmd-file-type-map
241
228
  ;(set-variable 'ycmd-extra-conf-whitelist '("/home/jorrit/Dev/*"))
242
229
  :config
243
230
  (setq url-show-status nil)  ; Makes those FUCKING annoying messages SHUT THE HELL UP
244
231
  (setq request-message-level -1)
245
232
  
246
233
  (use-package flycheck-ycmd
247
234
	:ensure t
248
235
	:commands (flycheck-ycmd-setup)
249
236
	:hook (ycmd-mode . flycheck-ycmd-setup)
250
237
	:init
251
238
	(setq flycheck-clang-language-standard "c++11")
252
239
	(when (not (display-graphic-p))
253
240
      (setq flycheck-indication-mode nil))))
254
241
255
242
(use-package company
256
243
 :hook (after-init . global-company-mode)
257
244
 :init
258
245
 (company-tng-configure-default)  ; Use <TAB> to scroll in completion options
259
246
 (setq company-minimum-prefix-length 2)
260
247
 (setq company-idle-delay 0.0)
261
248
 :config
262
249
 (use-package company-ycmd-mode
263
250
	:ensure company-ycmd
264
251
	:commands (company-ycmd-setup)
265
252
	:hook (ycmd-mode . company-ycmd-setup))
266
253
 (use-package company-flx
267
254
              :ensure t
268
255
              :config
269
256
              (company-flx-mode +1)))
270
257
271
258
(use-package clang-format
272
259
  :ensure t
273
260
  :general
274
261
  (local-leader-def
275
262
   :states 'normal
276
263
   :modes '(c-mode-map c++-mode-map)
277
264
   "b" '(:ignore t :which-key "clang")
278
265
   "bf" 'clang-format-buffer)
279
266
  :init
280
267
  (setq-default clang-format-style "{BasedOnStyle: llvm, IndentWidth: 4}"))
281
268
282
269
(use-package srefactor
283
270
  :ensure t
284
271
  :commands (srefactor-refactor-at-point)
285
272
  :hook ((c-mode c++-mode) . semantic-mode)
286
273
  :general
287
274
  (local-leader-def
288
275
   :states 'normal
289
276
   :keymaps '(c++-mode-map c-mode-map)
290
277
   "r" 'srefactor-refactor-at-point))
291
278
292
279
;; eViL-mode
293
280
(use-package evil
294
281
  :hook (after-init . evil-mode)
295
282
  :bind (:map evil-normal-state-map ;; Scrolls over lines correctly
296
283
              ("j" . evil-next-visual-line)
297
284
              ("k" . evil-previous-visual-line))
298
285
  :general
299
286
  (my-leader-def
300
287
	:states 'normal
301
288
    "b" '(:ignore t :which-key "buffer")
302
289
    "g" '(:ignore t :which-key "magit")
303
290
    "f" '(:ignore t :which-key "files")
304
291
	"bk" 'kill-this-buffer
305
292
	"bd" 'kill-other-buffers
306
293
	"bh" 'switch-to-home-buffer
307
294
	"br" 'revert-buffer
308
295
	"h" 'split-window-vertically
309
296
	"v" 'split-window-horizontally)
310
297
  (local-leader-def
311
298
	:states 'normal
312
299
    ;; General lang options
313
300
	"c" 'compile)
314
301
  :init
315
302
  (setq evil-find-skip-newlines t) ;; Allows f/F/t/T to search beyond CR/LF
316
303
  (setq evil-set-undo-system 'undo-tree) ;; Sets EViL up to use undo (after a
317
304
  ;; weird 2020 patch)
318
305
  (setq evil-want-C-u-scroll t)) ;; Activates c-u scroll to above.
319
306
320
307
;; About smooth-scrolling: I'd normally just use some variables for scrolling
321
308
;; but they all fail with org-mode. This package fixes everything that's wrong for me.
322
309
(use-package smooth-scrolling
323
310
   :config
324
311
   (smooth-scrolling-mode 1))
325
312
326
313
(use-package org
327
314
  :ensure t
328
315
  :pin "org"
329
316
  ; FIXME This causes some errors with bind-keys or what have you. Commented
330
317
  ; until it is fixed.
331
318
  ;:bind (:bind-keymap
332
319
  ;        ("C-c x" . org-todo-state-map)
333
320
  ;       :map org-todo-state-map
334
321
  ;        ("x" . #'(lambda nil (interactive) (org-todo "CANCELLED")))
335
322
  ;        ("d" . #'(lambda nil (interactive) (org-todo "DONE")))
336
323
  ;        ("f" . #'(lambda nil (interactive) (org-todo "DEFERRED")))
337
324
  ;        ("l" . #'(lambda nil (interactive) (org-todo "DELEGATED")))
338
325
  ;        ("s" . #'(lambda nil (interactive) (org-todo "STARTED")))
339
326
  ;        ("w" . #'(lambda nil (interactive) (org-todo "WAITING"))))
340
327
;         :map org-mode-map
341
328
;          ("C-c x" . org-todo-state-map))
342
329
   :init
343
330
  (define-key mode-specific-map [?a] 'org-agenda)
344
331
  :custom
345
332
  ;; Because I use XeLaTeX (it's objectively better), some variables need to be
346
333
  ;; set so org-mode knows what to call.
347
334
348
335
  ;; Okay, so you cán export asynchronous so compiling your PDF doesn't lock up
349
336
  ;; the editor completely, but for one reason or another, you MUST set the
350
337
  ;; async-debug to nil. Otherwise it will constantly "exit abnormally" without
351
338
  ;; reason. This fixes it, who knows why.
352
339
  (org-export-async-debug nil)
353
340
  
354
341
  (org-latex-compiler 'xelatex)  ; Makes sure the XeLaTeX compiler is used
355
342
  
356
343
  ; Tells Org to use dvisvgm because dvipng does not support XeLaTeX's output format
357
344
  (org-preview-latex-default-process 'dvisvgm)
358
345
  
359
346
  ; This edits the preview process so it works correctly with XeLaTeX.
360
347
  ; Changes: 
361
348
  ; - "latex" to "xelatex" 
362
349
  ; - Added the "-no-pdf" flag so it prints an XDV file instead of PDF.
363
350
  ; - change input type from dvi to xdv
364
351
  ; - Only leave the dvisvgm option because I don't need the others
365
352
  (org-preview-latex-process-alist
366
353
   (quote
367
354
    ((dvisvgm :programs
368
355
              ("xelatex" "dvisvgm")
369
356
              :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
370
357
              (1.7 . 1.5)
371
358
              :latex-compiler
372
359
              ("xelatex -interaction nonstopmode -no-pdf -output-directory %o %f")
373
360
              :image-converter
374
361
              ("dvisvgm %f -n -b min -c %S -o %O")))))
375
362
376
363
  ;; Sets the formatting options. I only changed :scale to 1.6, but I don't know
377
364
  ;; how to change only thát, so for now I'm configuring the entire variable
378
365
  (org-format-latex-options (quote
379
366
   (:foreground default :background default :scale 1.6 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers
380
367
             ("begin" "$1" "$" "$$" "\\(" "\\["))))
381
368
    
382
369
  ;; Sets the directory in which the preview fragments are stored to the /tmp
383
370
  ;; folder. Otherwise it clutters up the folder in which the source resides
384
371
  ;; with what are essentially cache files.
385
372
  (org-preview-latex-image-directory "/tmp/ltximg/")
386
373
  
387
374
  ;; Following customizations are in regard to org-agenda configuration.
388
375
  (org-agenda-files (quote ("~/shared/planning/planning.org")))
389
376
  (org-default-notes-file "~/shared/planning/notes.org")
390
377
  (org-agenda-span 62)
391
378
  (org-deadline-warning-days 14)
392
379
  (org-agenda-show-all-dates t)
393
380
  (org-agenda-skip-deadline-if-done t)
394
381
  (org-agenda-skip-scheduled-if-done t)
395
382
  (org-agenda-start-on-weekday nil)
396
383
  (org-reverse-note-order t)
397
384
  (org-fast-tag-selection-single-key (quote expert))
398
385
  (org-agenda-custom-commands
399
386
    (quote (("d" todo "DELEGATED" nil)
400
387
      ("c" todo "DONE|DEFERRED|CANCELED" nil)
401
388
      ("w" todo "WAITING" nil)
402
389
      ("W" agenda "" ((org-agenda-ndays 21)))
403
390
      ("A" agenda ""
404
391
        ((org-agenda-skip-function
405
392
          (lambda nil
406
393
      (org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]")))
407
394
        (org-agenda-ndays 1)
408
395
        (org-agenda-overriding-header "Today's Priority #A tasks: ")))
409
396
      ("u" alltodo ""
410
397
        ((org-agenda-skip-function
411
398
          (lambda nil
412
399
      (org-agenda-skip-entry-if (quote scheduled) (quote deadline)
413
400
              (quote regexp) "\n]+>")))
414
401
        (org-agenda-overriding-header "Unscheduled TODO entries: "))))))
415
402
  (org-capture-store-without-prompt t)
416
403
  (org-capture-templates
417
404
    (quote ((116 "* TODO %?\n  %u" "~/Repositories/private/org/planning.org" "Tasks")
418
405
      (110 "* %u %?" "~/Repositories/private/org/notes.org" "Notes"))))
419
406
  (capture-annotation-functions (quote (org-capture-annotation)))
420
407
  (capture-handler-functions (quote (org-capture-handler))))
421
408
422
409
  ;:general
423
410
  ;(local-leader-def
424
411
  ;  :states 'normal
425
412
  ;  :keymaps 'org-mode-map
426
413
;	"e" 'org-export-dispatch
427
414
;	"x" 'org-table-export
428
415
;	"." 'org-time-stamp
429
416
;	"t" 'org-twbs-export-to-html
430
417
;	"s" 'org-schedule
431
418
;	"d" 'org-deadline
432
419
;	"'" 'org-edit-special)
433
420
;  :config
434
421
;  ;; log todo items with timestamp
435
422
;  (setq org-log-done 'time))
436
423
437
424
;; XXX: I've opted not to use Cider for now because Clojure-mode and Company
438
425
;; already give enough completion and fast enough that I don't really feel like
439
426
;; I need this for now. I'll add it later when it's more useful.
440
427
(use-package cider
441
428
  :ensure t)
442
429
;  :ensure t
443
430
;  :hook clojure-mode)
444
431
  ;:mode "\\.clj\\'")
445
432
;; TODO See what can be deleted from helm config while still having all the
446
433
;; wanted functionality
447
434
(use-package helm
448
435
  :ensure t
449
436
  :hook (after-init . helm-mode)
450
437
  :commands (helm-autoresize-mode)
451
438
  :init
452
439
  ;; (defvar helm-google-suggest-use-curl-p)
453
440
  (defvar helm-ff-search-library-in-sexp)
454
441
  (defvar helm-echo-input-in-header-line)
455
442
  (defvar helm-ff-file-name-history-use-recentf)
456
443
  :general
457
444
  (general-define-key
458
445
   "M-x" 'helm-M-x
459
446
   "M-:" 'helm-eval-expression
460
447
   "C-c h" 'helm-command-prefix)
461
448
  (general-define-key
462
449
   :keymaps 'helm-map
463
450
   "<tab>" 'helm-execute-persistent-action
464
451
   "C-i" 'helm-execute-persistent-action
465
452
   "C-z" 'helm-select-action)
466
453
  (my-leader-def
467
454
	:states 'normal
468
455
	"bb" 'helm-buffers-list
469
456
	"ff" 'helm-find-files
470
457
	"p" 'helm-show-kill-ring)
471
458
  :config
472
459
  (setq helm-split-window-inside-p           t ; open helm buffer inside current window, not occupy whole other window
473
460
	helm-move-to-line-cycle-in-source     t ; move to end or beginning of source when reaching top or bottom of source.
474
461
	helm-ff-search-library-in-sexp        t ; search for library in `require' and `declare-function' sexp.
475
462
	helm-scroll-amount                    8 ; scroll 8 lines other window using m-<next>/m-<prior>
476
463
	helm-ff-file-name-history-use-recentf t
477
464
	helm-echo-input-in-header-line t)
478
465
479
466
  ;; hide some autogenerated files from helm
480
467
  (setq helm-ff-skip-boring-files t)
481
468
  ;; (add-to-list 'helm-boring-file-regexp-list "\\~$")
482
469
  
483
470
  (setq helm-autoresize-max-height 0)
484
471
  (setq helm-autoresize-min-height 20)
485
472
  (helm-autoresize-mode 1))
486
473
487
474
488
475
(use-package rainbow-delimiters
489
476
  :hook (prog-mode . rainbow-delimiters-mode))
490
477
491
478
;; Font settings, ligatures and symbol config
492
479
(set-frame-font "Hack 13" nil t)
493
480
494
481
(use-package pretty-mode
495
482
    :ensure t
496
483
    :init
497
484
    (global-pretty-mode t)
498
485
    (pretty-deactivate-groups
499
486
     '(:equality :ordering :ordering-double :ordering-triple
500
487
                 :arrows :arrows-twoheaded :punctuation
501
488
                 :logic :sets))
502
489
    (pretty-activate-groups
503
490
     '(:sub-and-superscripts :greek :arithmetic-nary)))
504
491
(global-prettify-symbols-mode 1)
505
492
(add-hook
506
493
 'python-mode-hook
507
494
 (lambda ()
508
495
   (mapc (lambda (pair) (push pair prettify-symbols-alist))
509
496
         '(;; Syntax
510
497
           ("def" .      #x2131)
511
498
           ("not" .      #x2757)
512
499
           ("in" .       #x2208)
513
500
           ("not in" .   #x2209)
514
501
           ("return" .   #x27fc)
515
502
           ("yield" .    #x27fb)
516
503
           ("for" .      #x2200)
517
504
           ;; Base Types
518
505
           ("int" .      #x2124)
519
506
           ("float" .    #x211d)
520
507
           ("str" .      #x1d54a)
521
508
           ("True" .     #x1d54b)
522
509
           ("False" .    #x1d53d)
523
510
           ;; Mypy
524
511
           ("Dict" .     #x1d507)
525
512
           ("List" .     #x2112)
526
513
           ("Tuple" .    #x2a02)
527
514
           ("Set" .      #x2126)
528
515
           ("Iterable" . #x1d50a)
529
516
           ("Any" .      #x2754)
530
517
           ("Union" .    #x22c3)))))
531
518
532
519
;; Settings for having an LaTeX beamer class export tool
533
520
(unless (boundp 'org-export-latex-classes)
534
521
(setq org-export-latex-classes nil))
535
522
(add-to-list 'org-export-latex-classes
536
523
;; beamer class, for presentations
537
524
'("beamer"
538
525
    "\\documentclass[11pt]{beamer}\n
539
526
    \\mode<{{{beamermode}}}>\n
540
527
    \\usetheme{{{{beamertheme}}}}\n
541
528
    \\usecolortheme{{{{beamercolortheme}}}}\n
542
529
    \\beamertemplateballitem\n
543
530
    \\setbeameroption{show notes}
544
531
    \\usepackage[utf8]{inputenc}\n
545
532
    \\usepackage[T1]{fontenc}\n
546
533
    \\usepackage{hyperref}\n
547
534
    \\usepackage{color}
548
535
    \\usepackage{listings}
549
536
    \\lstset{numbers=none,language=[ISO]C++,tabsize=4,
550
537
frame=single,
551
538
basicstyle=\\small,
552
539
showspaces=false,showstringspaces=false,
553
540
showtabs=false,
554
541
keywordstyle=\\color{blue}\\bfseries,
555
542
commentstyle=\\color{red},
556
543
}\n
557
544
    \\usepackage{verbatim}\n
558
545
    \\institute{{{{beamerinstitute}}}}\n          
559
546
    \\subject{{{{beamersubject}}}}\n"
560
547
561
548
    ("\\section{%s}" . "\\section*{%s}")
562
549
563
550
    ("\\begin{frame}[fragile]\\frametitle{%s}"
564
551
    "\\end{frame}"
565
552
    "\\begin{frame}[fragile]\\frametitle{%s}"
566
553
    "\\end{frame}")))
567
554
568
555
;; Adds a letter class, for formal letters
569
556
570
557
(add-to-list 'org-export-latex-classes
571
558
572
559
'("letter"
573
560
    "\\documentclass[11pt]{letter}\n
574
561
    \\usepackage[utf8]{inputenc}\n
575
562
    \\usepackage[T1]{fontenc}\n
576
563
    \\usepackage{color}"
577
564
578
565
    ("\\section{%s}" . "\\section*{%s}")
579
566
    ("\\subsection{%s}" . "\\subsection*{%s}")
580
567
    ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
581
568
    ("\\paragraph{%s}" . "\\paragraph*{%s}")
582
569
    ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
583
570
584
571
585
572
;(require 'ycmd)
586
573
;(add-hook 'after-init-hook #'global-ycmd-mode)
587
574
(custom-set-faces
588
575
 ;; custom-set-faces was added by Custom.
589
576
 ;; If you edit it by hand, you could mess it up, so be careful.
590
577
 ;; Your init file should contain only one such instance.
591
578
 ;; If there is more than one, they won't work right.
592
579
 )
593
580