Blame


1 cd826e3e 2023-06-26 benni #+TITLE: My New Emacs Config
2 cd826e3e 2023-06-26 benni #+AUTHOR: Benjamin Stürz
3 cd826e3e 2023-06-26 benni #+OPTIONS: toc:2
4 cd826e3e 2023-06-26 benni
5 cd826e3e 2023-06-26 benni * Initialization
6 cd826e3e 2023-06-26 benni ** Variables
7 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
8 cd826e3e 2023-06-26 benni (set-face-attribute 'default nil :height 70)
9 cd826e3e 2023-06-26 benni (add-to-list 'bdf-directory-list (expand-file-name "~/.local/share/fonts"))
10 cd826e3e 2023-06-26 benni ;(add-to-list 'bdf-directory-list "a")
11 cd826e3e 2023-06-26 benni
12 cd826e3e 2023-06-26 benni ;;(defalias 'yes-or-no-p 'y-or-no-p)
13 cd826e3e 2023-06-26 benni #+end_src
14 cd826e3e 2023-06-26 benni
15 cd826e3e 2023-06-26 benni ** Package Management
16 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
17 cd826e3e 2023-06-26 benni (require 'package)
18 cd826e3e 2023-06-26 benni (setq package-archives '(("melpa" . "https://melpa.org/packages/")
19 cd826e3e 2023-06-26 benni ("org" . "https://orgmode.org/elpa/")
20 cd826e3e 2023-06-26 benni ("elpa" . "https://elpa.gnu.org/packages/")))
21 cd826e3e 2023-06-26 benni
22 cd826e3e 2023-06-26 benni (package-initialize)
23 cd826e3e 2023-06-26 benni (unless package-archive-contents
24 cd826e3e 2023-06-26 benni (package-refresh-contents))
25 cd826e3e 2023-06-26 benni
26 cd826e3e 2023-06-26 benni ;; Initialize use-package
27 cd826e3e 2023-06-26 benni (unless (package-installed-p 'use-package)
28 cd826e3e 2023-06-26 benni (package-install 'use-package))
29 cd826e3e 2023-06-26 benni
30 cd826e3e 2023-06-26 benni (require 'use-package)
31 cd826e3e 2023-06-26 benni (setq use-package-always-ensure t)
32 cd826e3e 2023-06-26 benni ;;(setq use-package-verbose t)
33 cd826e3e 2023-06-26 benni
34 cd826e3e 2023-06-26 benni (use-package no-littering)
35 cd826e3e 2023-06-26 benni (setq auto-save-file-name-transforms `((".*" ,(no-littering-expand-var-file-name "auto-save/") t)))
36 cd826e3e 2023-06-26 benni (setq backup-directory-alist `(("." . ,(no-littering-expand-var-file-name "auto-save/"))))
37 cd826e3e 2023-06-26 benni #+end_src
38 cd826e3e 2023-06-26 benni
39 cd826e3e 2023-06-26 benni ** Modes
40 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
41 cd826e3e 2023-06-26 benni (scroll-bar-mode -1) ;; Disable visible scroll bar
42 cd826e3e 2023-06-26 benni (tool-bar-mode -1) ;; Disable the toolbar
43 cd826e3e 2023-06-26 benni (tooltip-mode -1) ;; Disable tooltips
44 cd826e3e 2023-06-26 benni (menu-bar-mode -1) ;; Disable the menubar
45 cd826e3e 2023-06-26 benni (set-fringe-mode 10) ;; Give some breathing room
46 cd826e3e 2023-06-26 benni (column-number-mode) ;;
47 59a3509f 2023-10-06 benni (setq display-line-numbers-type 'relative) ;; Relative line numbers
48 cd826e3e 2023-06-26 benni (global-display-line-numbers-mode t) ;; Display line numbers
49 cd826e3e 2023-06-26 benni (recentf-mode 1) ;; Save recently opened files mode
50 cd826e3e 2023-06-26 benni ;;(recentf-load-list) ;; Load recently opened files
51 cd826e3e 2023-06-26 benni (setq history-length 100) ;;
52 cd826e3e 2023-06-26 benni (savehist-mode 1) ;; Save history
53 cd826e3e 2023-06-26 benni (save-place-mode 1) ;; Save place in file
54 cd826e3e 2023-06-26 benni (setq global-auto-revert-non-file-buffers t)
55 cd826e3e 2023-06-26 benni (global-auto-revert-mode 1) ;;
56 cd826e3e 2023-06-26 benni #+end_src
57 cd826e3e 2023-06-26 benni
58 cd826e3e 2023-06-26 benni ** UI Configuration
59 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
60 cd826e3e 2023-06-26 benni (setq ring-bell-function 'ignore ;; Disable the bell
61 cd826e3e 2023-06-26 benni inhibit-startup-message t ;; Don't display the startup screen
62 cd826e3e 2023-06-26 benni scroll-step 1 ;; Make scrolling smoother
63 cd826e3e 2023-06-26 benni scroll-conservatively 10000 ;; Remove the jumpiness
64 cd826e3e 2023-06-26 benni use-dialog-box nil ;; Don't show the dialog box
65 cd826e3e 2023-06-26 benni custom-file (locate-user-emacs-file "custom.el"))
66 cd826e3e 2023-06-26 benni
67 cd826e3e 2023-06-26 benni (load custom-file 'noerror 'nomessage)
68 cd826e3e 2023-06-26 benni
69 cd826e3e 2023-06-26 benni ;; Make the frame fullscreen
70 cd826e3e 2023-06-26 benni (set-frame-parameter (selected-frame) 'fullscreen 'maximized)
71 cd826e3e 2023-06-26 benni (add-to-list 'default-frame-alist '(fullscreen . maximized))
72 cd826e3e 2023-06-26 benni
73 cd826e3e 2023-06-26 benni ;; Disable line numbers for some modes
74 cd826e3e 2023-06-26 benni (dolist (mode '(term-mode-hook
75 cd826e3e 2023-06-26 benni shell-mode-hook
76 cd826e3e 2023-06-26 benni treemacs-mode-hook
77 cd826e3e 2023-06-26 benni eshell-mode-hook
78 cd826e3e 2023-06-26 benni vterm-mode-hook))
79 cd826e3e 2023-06-26 benni (add-hook mode (lambda () (display-line-numbers-mode 0))))
80 cd826e3e 2023-06-26 benni #+end_src
81 cd826e3e 2023-06-26 benni
82 cd826e3e 2023-06-26 benni * Packages
83 cd826e3e 2023-06-26 benni ** Appearence
84 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
85 cd826e3e 2023-06-26 benni (use-package doom-themes
86 cd826e3e 2023-06-26 benni :init
87 cd826e3e 2023-06-26 benni (load-theme 'doom-palenight t))
88 cd826e3e 2023-06-26 benni
89 cd826e3e 2023-06-26 benni (use-package rainbow-delimiters
90 cd826e3e 2023-06-26 benni :hook (prog-mode . rainbow-delimiters-mode))
91 cd826e3e 2023-06-26 benni
92 cd826e3e 2023-06-26 benni ;; (use-package all-the-icons
93 cd826e3e 2023-06-26 benni ;; :if (display-graphic-p)
94 cd826e3e 2023-06-26 benni ;; :commands all-the-icons-install-fonts
95 cd826e3e 2023-06-26 benni ;; :init
96 cd826e3e 2023-06-26 benni ;; (unless (find-font (font-spec :name "all-the-icons"))
97 cd826e3e 2023-06-26 benni ;; (all-the-icons-install-fonts t)))
98 cd826e3e 2023-06-26 benni
99 cd826e3e 2023-06-26 benni ;; (use-package moody
100 cd826e3e 2023-06-26 benni ;; :config
101 cd826e3e 2023-06-26 benni ;; (setq x-underline-at-descent-line t
102 cd826e3e 2023-06-26 benni ;; mood-mode-line-height 10)
103 cd826e3e 2023-06-26 benni ;; (moody-replace-mode-line-buffer-identification)
104 cd826e3e 2023-06-26 benni ;; (moody-replace-vc-mode)
105 cd826e3e 2023-06-26 benni ;; (moody-replace-eldoc-minibuffer-message-function))
106 cd826e3e 2023-06-26 benni
107 cd826e3e 2023-06-26 benni ;;(use-package doom-modeline
108 cd826e3e 2023-06-26 benni ;; :init
109 cd826e3e 2023-06-26 benni ;; (doom-modeline-mode 1)
110 cd826e3e 2023-06-26 benni ;; :custom
111 cd826e3e 2023-06-26 benni ;; (doom-modeline-height 10))
112 cd826e3e 2023-06-26 benni #+end_src
113 cd826e3e 2023-06-26 benni
114 cd826e3e 2023-06-26 benni ** Dashboard
115 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
116 cd826e3e 2023-06-26 benni (use-package page-break-lines)
117 cd826e3e 2023-06-26 benni (use-package dashboard
118 cd826e3e 2023-06-26 benni :after page-break-lines
119 cd826e3e 2023-06-26 benni :config
120 cd826e3e 2023-06-26 benni (setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*"))
121 cd826e3e 2023-06-26 benni dashboard-banner-logo-title "Emacs Dashboard"
122 cd826e3e 2023-06-26 benni dashboard-startup-banner 'logo
123 cd826e3e 2023-06-26 benni dashboard-center-content t
124 cd826e3e 2023-06-26 benni dashboard-set-heading-icons t
125 cd826e3e 2023-06-26 benni dashboard-set-file-icons t
126 cd826e3e 2023-06-26 benni dashboard-set-navigator t
127 cd826e3e 2023-06-26 benni dashboard-items '((recents . 5) (bookmarks . 5) (projects . 5) (agenda . 5) (registers . 5)))
128 cd826e3e 2023-06-26 benni (dashboard-setup-startup-hook))
129 cd826e3e 2023-06-26 benni #+end_src
130 cd826e3e 2023-06-26 benni
131 cd826e3e 2023-06-26 benni ** Undo
132 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
133 cd826e3e 2023-06-26 benni (if (version< emacs-version "28.1")
134 cd826e3e 2023-06-26 benni (progn
135 cd826e3e 2023-06-26 benni (use-package undo-fu)
136 cd826e3e 2023-06-26 benni (setq benni/redo 'undo-fu))
137 cd826e3e 2023-06-26 benni (setq benni/redo 'undo-redo))
138 cd826e3e 2023-06-26 benni #+end_src
139 cd826e3e 2023-06-26 benni ** Evil
140 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
141 cd826e3e 2023-06-26 benni (use-package evil
142 cd826e3e 2023-06-26 benni :init
143 cd826e3e 2023-06-26 benni (setq evil-want-integration t
144 cd826e3e 2023-06-26 benni evil-want-keybinding nil
145 cd826e3e 2023-06-26 benni evil-want-C-u-scroll t
146 cd826e3e 2023-06-26 benni evil-want-C-i-jump nil
147 cd826e3e 2023-06-26 benni evil-want-fine-undo t
148 cd826e3e 2023-06-26 benni evil-undo-system benni/redo)
149 cd826e3e 2023-06-26 benni
150 cd826e3e 2023-06-26 benni :config
151 cd826e3e 2023-06-26 benni (evil-mode 1)
152 cd826e3e 2023-06-26 benni (define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state)
153 cd826e3e 2023-06-26 benni (define-key evil-insert-state-map (kbd "C-h") 'evil-delete-backward-char-and-join)
154 cd826e3e 2023-06-26 benni (define-key evil-normal-state-map (kbd "C-.") 'evil-switch-to-windows-last-buffer)
155 cd826e3e 2023-06-26 benni (global-set-key (kbd "C-.") 'evil-switch-to-windows-last-buffer)
156 cd826e3e 2023-06-26 benni
157 cd826e3e 2023-06-26 benni ;; Use visual line motions even outside of visual-line-mode buffers.
158 cd826e3e 2023-06-26 benni (evil-global-set-key 'motion "j" 'evil-next-visual-line)
159 cd826e3e 2023-06-26 benni (evil-global-set-key 'motion "k" 'evil-previous-visual-line)
160 cd826e3e 2023-06-26 benni
161 cd826e3e 2023-06-26 benni (evil-set-initial-state 'messages-buffer-mode 'normal)
162 cd826e3e 2023-06-26 benni (evil-set-initial-state 'dashboard-mode 'normal))
163 cd826e3e 2023-06-26 benni
164 cd826e3e 2023-06-26 benni (use-package evil-collection
165 cd826e3e 2023-06-26 benni :after evil
166 cd826e3e 2023-06-26 benni :config
167 cd826e3e 2023-06-26 benni (evil-collection-init))
168 cd826e3e 2023-06-26 benni #+end_src
169 cd826e3e 2023-06-26 benni
170 cd826e3e 2023-06-26 benni ** Ivy
171 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
172 cd826e3e 2023-06-26 benni (use-package ivy
173 cd826e3e 2023-06-26 benni :diminish
174 cd826e3e 2023-06-26 benni :bind (("C-s" . swiper)
175 cd826e3e 2023-06-26 benni :map ivy-minibuffer-map
176 cd826e3e 2023-06-26 benni ("TAB" . ivy-alt-done))
177 cd826e3e 2023-06-26 benni :config
178 cd826e3e 2023-06-26 benni (ivy-mode 1))
179 cd826e3e 2023-06-26 benni
180 cd826e3e 2023-06-26 benni (use-package ivy-rich
181 cd826e3e 2023-06-26 benni :after ivy
182 cd826e3e 2023-06-26 benni :init
183 cd826e3e 2023-06-26 benni (ivy-rich-mode 1))
184 cd826e3e 2023-06-26 benni
185 cd826e3e 2023-06-26 benni (use-package ivy-prescient
186 cd826e3e 2023-06-26 benni :after (ivy counsel prescient)
187 cd826e3e 2023-06-26 benni :config
188 cd826e3e 2023-06-26 benni (setq ivy-prescient-retain-classic-highlighting t)
189 cd826e3e 2023-06-26 benni (ivy-prescient-mode 1))
190 cd826e3e 2023-06-26 benni #+end_src
191 cd826e3e 2023-06-26 benni
192 cd826e3e 2023-06-26 benni ** Consel
193 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
194 cd826e3e 2023-06-26 benni (use-package counsel
195 cd826e3e 2023-06-26 benni :defer nil
196 cd826e3e 2023-06-26 benni :bind (("M-x" . counsel-M-x)
197 cd826e3e 2023-06-26 benni ("C-x b" . counsel-ibuffer)
198 cd826e3e 2023-06-26 benni ("C-x C-f" . counsel-find-file)
199 cd826e3e 2023-06-26 benni :map minibuffer-local-map
200 cd826e3e 2023-06-26 benni ("C-r" . 'counsel-minibuffer-history))
201 cd826e3e 2023-06-26 benni :config
202 cd826e3e 2023-06-26 benni (setq ivy-initial-inputs-alist nil))
203 cd826e3e 2023-06-26 benni
204 cd826e3e 2023-06-26 benni (use-package counsel-projectile
205 cd826e3e 2023-06-26 benni :after (counsel projectile)
206 cd826e3e 2023-06-26 benni :config (counsel-projectile-mode))
207 cd826e3e 2023-06-26 benni #+end_src
208 cd826e3e 2023-06-26 benni
209 cd826e3e 2023-06-26 benni ** Company
210 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
211 cd826e3e 2023-06-26 benni (use-package company
212 cd826e3e 2023-06-26 benni :after lsp-mode
213 cd826e3e 2023-06-26 benni :hook (lsp-mode . company-mode)
214 cd826e3e 2023-06-26 benni :bind
215 cd826e3e 2023-06-26 benni (:map lsp-mode-map ("<tab>" . company-indent-or-complete-common))
216 cd826e3e 2023-06-26 benni (:map company-active-map ("<tab>" . company-complete-selection))
217 cd826e3e 2023-06-26 benni :custom
218 cd826e3e 2023-06-26 benni (company-minimum-prefix-length 1)
219 cd826e3e 2023-06-26 benni (company-idle-delay 0.5))
220 cd826e3e 2023-06-26 benni
221 cd826e3e 2023-06-26 benni (use-package company-box
222 cd826e3e 2023-06-26 benni :hook (company-mode . company-box-mode))
223 cd826e3e 2023-06-26 benni
224 cd826e3e 2023-06-26 benni (use-package company-prescient
225 cd826e3e 2023-06-26 benni :after (company prescient)
226 cd826e3e 2023-06-26 benni :config
227 cd826e3e 2023-06-26 benni (company-prescient-mode 1))
228 cd826e3e 2023-06-26 benni #+end_src
229 cd826e3e 2023-06-26 benni
230 cd826e3e 2023-06-26 benni ** Flycheck
231 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
232 cd826e3e 2023-06-26 benni (use-package flycheck
233 cd826e3e 2023-06-26 benni :after lsp-mode)
234 cd826e3e 2023-06-26 benni #+end_src
235 cd826e3e 2023-06-26 benni
236 cd826e3e 2023-06-26 benni ** Prescient
237 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
238 cd826e3e 2023-06-26 benni (use-package prescient
239 cd826e3e 2023-06-26 benni :config
240 cd826e3e 2023-06-26 benni (setq prescient-sort-length-enable t
241 cd826e3e 2023-06-26 benni prescient-filter-method '(literal regexp initialism))
242 cd826e3e 2023-06-26 benni (prescient-persist-mode 1))
243 cd826e3e 2023-06-26 benni #+end_src
244 cd826e3e 2023-06-26 benni
245 cd826e3e 2023-06-26 benni ** which-key
246 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
247 cd826e3e 2023-06-26 benni (use-package which-key
248 cd826e3e 2023-06-26 benni :diminish which-key-mode
249 cd826e3e 2023-06-26 benni :config
250 cd826e3e 2023-06-26 benni (which-key-mode)
251 cd826e3e 2023-06-26 benni (setq which-key-idle-delay 0.5))
252 cd826e3e 2023-06-26 benni #+end_src
253 cd826e3e 2023-06-26 benni
254 cd826e3e 2023-06-26 benni ** helpful
255 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
256 cd826e3e 2023-06-26 benni (use-package helpful
257 cd826e3e 2023-06-26 benni :after (counsel)
258 cd826e3e 2023-06-26 benni :commands (helpful-callable helpful-variable helpful-command helpful-key)
259 cd826e3e 2023-06-26 benni :custom
260 cd826e3e 2023-06-26 benni (counsel-describe-function-function #'helpful-callable)
261 cd826e3e 2023-06-26 benni (counsel-describe-variable-function #'helpful-variable)
262 cd826e3e 2023-06-26 benni :bind
263 cd826e3e 2023-06-26 benni ([remap describe-function] . counsel-describe-function)
264 cd826e3e 2023-06-26 benni ([remap describe-variable] . counsel-describe-variable)
265 cd826e3e 2023-06-26 benni ([remap describe-command] . helpful-command)
266 cd826e3e 2023-06-26 benni ([remap describe-key] . helpful-key))
267 cd826e3e 2023-06-26 benni #+end_src
268 cd826e3e 2023-06-26 benni
269 cd826e3e 2023-06-26 benni ** vterm
270 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
271 cd826e3e 2023-06-26 benni (use-package vterm
272 cd826e3e 2023-06-26 benni :commands vterm
273 cd826e3e 2023-06-26 benni :config
274 cd826e3e 2023-06-26 benni (setq vterm-max-scrollback 10000))
275 cd826e3e 2023-06-26 benni #+end_src
276 cd826e3e 2023-06-26 benni
277 cd826e3e 2023-06-26 benni ** General
278 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
279 cd826e3e 2023-06-26 benni (global-set-key (kbd "<escape>") 'keyboard-escape-quit)
280 cd826e3e 2023-06-26 benni
281 cd826e3e 2023-06-26 benni (use-package general
282 cd826e3e 2023-06-26 benni :config
283 cd826e3e 2023-06-26 benni (general-create-definer
284 cd826e3e 2023-06-26 benni benni/leader-keys
285 cd826e3e 2023-06-26 benni :keymaps '(normal insert visual emacs)
286 cd826e3e 2023-06-26 benni :prefix "SPC"
287 cd826e3e 2023-06-26 benni :global-prefix "C-SPC"))
288 cd826e3e 2023-06-26 benni
289 cd826e3e 2023-06-26 benni (use-package hydra
290 cd826e3e 2023-06-26 benni :defer t)
291 cd826e3e 2023-06-26 benni
292 cd826e3e 2023-06-26 benni (benni/leader-keys
293 cd826e3e 2023-06-26 benni "." '(counsel-find-file :which-key "open file")
294 cd826e3e 2023-06-26 benni "V" '(vterm-other-window :which-key "vterm-other-window")
295 cd826e3e 2023-06-26 benni "b" '(:ignore t :which-key "buffer")
296 cd826e3e 2023-06-26 benni "bK" '(kill-buffer :which-key "kill buffer")
297 cd826e3e 2023-06-26 benni "bb" '(counsel-switch-buffer :which-key "switch buffer")
298 cd826e3e 2023-06-26 benni "bk" '(kill-current-buffer :which-key "kill current buffer")
299 cd826e3e 2023-06-26 benni "c" '(counsel-compile :which-key "compile")
300 cd826e3e 2023-06-26 benni "g" '(magit-status :which-key "magit")
301 cd826e3e 2023-06-26 benni "m" '(mu4e :which-key "mu4e")
302 cd826e3e 2023-06-26 benni "r" '(counsel-recentf :which-key "recent files")
303 cd826e3e 2023-06-26 benni "t" '(:ignore t :which-key "toggles")
304 cd826e3e 2023-06-26 benni "tm" '(treemacs :which-key "treemacs")
305 cd826e3e 2023-06-26 benni "ts" '(hydra-text-scale/body :which-key "scale text")
306 cd826e3e 2023-06-26 benni "tt" '(counsel-load-theme :which-key "choose theme")
307 cd826e3e 2023-06-26 benni "v" '(vterm :which-key "vterm"))
308 cd826e3e 2023-06-26 benni
309 cd826e3e 2023-06-26 benni (defhydra hydra-text-scale
310 cd826e3e 2023-06-26 benni (:timeout 5)
311 cd826e3e 2023-06-26 benni "scale text"
312 cd826e3e 2023-06-26 benni ("+" text-scale-increase "in")
313 cd826e3e 2023-06-26 benni ("-" text-scale-decrease "out"))
314 cd826e3e 2023-06-26 benni #+end_src
315 cd826e3e 2023-06-26 benni
316 cd826e3e 2023-06-26 benni ** Magit
317 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
318 cd826e3e 2023-06-26 benni (use-package magit
319 cd826e3e 2023-06-26 benni :defer t
320 cd826e3e 2023-06-26 benni :commands (magit-status)
321 cd826e3e 2023-06-26 benni :config
322 cd826e3e 2023-06-26 benni (setq magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1))
323 cd826e3e 2023-06-26 benni #+end_src
324 cd826e3e 2023-06-26 benni
325 cd826e3e 2023-06-26 benni ** Treemacs
326 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
327 cd826e3e 2023-06-26 benni (use-package treemacs
328 cd826e3e 2023-06-26 benni :defer t
329 cd826e3e 2023-06-26 benni :commands (treemacs)
330 cd826e3e 2023-06-26 benni :bind (:map treemacs-mode-map
331 cd826e3e 2023-06-26 benni ("J" . treemacs-select-directory))
332 cd826e3e 2023-06-26 benni :config
333 cd826e3e 2023-06-26 benni (setq treemacs-width 25))
334 cd826e3e 2023-06-26 benni
335 cd826e3e 2023-06-26 benni (use-package treemacs-evil
336 cd826e3e 2023-06-26 benni :after (treemacs evil))
337 cd826e3e 2023-06-26 benni
338 cd826e3e 2023-06-26 benni (use-package treemacs-projectile
339 cd826e3e 2023-06-26 benni :after (treemacs projectile))
340 cd826e3e 2023-06-26 benni
341 cd826e3e 2023-06-26 benni (use-package treemacs-magit
342 cd826e3e 2023-06-26 benni :after (treemacs magit))
343 cd826e3e 2023-06-26 benni #+end_src
344 cd826e3e 2023-06-26 benni
345 cd826e3e 2023-06-26 benni ** Projectile
346 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
347 cd826e3e 2023-06-26 benni (use-package projectile
348 cd826e3e 2023-06-26 benni :diminish projectile-mode
349 cd826e3e 2023-06-26 benni :config (projectile-mode)
350 cd826e3e 2023-06-26 benni :custom ((projectile-completion-system 'ivy))
351 cd826e3e 2023-06-26 benni :bind-keymap ("C-c p" . projectile-command-map)
352 cd826e3e 2023-06-26 benni :init
353 cd826e3e 2023-06-26 benni (when (file-directory-p "~/src")
354 cd826e3e 2023-06-26 benni (setq projectile-project-searchpath '("~/src")))
355 cd826e3e 2023-06-26 benni (setq projectile-switch-project-action #'projectile-dired))
356 cd826e3e 2023-06-26 benni #+end_src
357 cd826e3e 2023-06-26 benni
358 cd826e3e 2023-06-26 benni * Org
359 cd826e3e 2023-06-26 benni ** Setup
360 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
361 59a3509f 2023-10-06 benni (use-package gnuplot)
362 cd826e3e 2023-06-26 benni (defun benni/org-mode-setup ()
363 cd826e3e 2023-06-26 benni (org-indent-mode)
364 cd826e3e 2023-06-26 benni (variable-pitch-mode 0)
365 cd826e3e 2023-06-26 benni (auto-fill-mode 0)
366 cd826e3e 2023-06-26 benni (visual-line-mode 1)
367 cd826e3e 2023-06-26 benni (setq evil-auto-indent nil))
368 cd826e3e 2023-06-26 benni #+end_src
369 cd826e3e 2023-06-26 benni ** org
370 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
371 cd826e3e 2023-06-26 benni (use-package org
372 cd826e3e 2023-06-26 benni :defer t
373 cd826e3e 2023-06-26 benni :pin org
374 cd826e3e 2023-06-26 benni :hook (org-mode . benni/org-mode-setup)
375 cd826e3e 2023-06-26 benni :config
376 cd826e3e 2023-06-26 benni (setq org-ellipsis " ▾"
377 cd826e3e 2023-06-26 benni org-hide-emphasis-markers t
378 cd826e3e 2023-06-26 benni org-done 'time
379 cd826e3e 2023-06-26 benni org-agenda-start-with-log-mode t
380 cd826e3e 2023-06-26 benni org-log-into-drawer t
381 cd826e3e 2023-06-26 benni org-confirm-babel-evaluate nil))
382 cd826e3e 2023-06-26 benni
383 cd826e3e 2023-06-26 benni #+end_src
384 cd826e3e 2023-06-26 benni ** org-tempo
385 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
386 cd826e3e 2023-06-26 benni (use-package org-tempo
387 cd826e3e 2023-06-26 benni :ensure nil
388 cd826e3e 2023-06-26 benni :after org
389 cd826e3e 2023-06-26 benni :config
390 cd826e3e 2023-06-26 benni (setq org-structure-template-alist '(("c" . "src c")
391 cd826e3e 2023-06-26 benni ("bash" . "src bash")
392 cd826e3e 2023-06-26 benni ("sh" . "src shell")
393 59a3509f 2023-10-06 benni ("rs" . "src rust")
394 59a3509f 2023-10-06 benni ("java" . "src java")
395 cd826e3e 2023-06-26 benni ("el" . "src emacs-lisp")
396 cd826e3e 2023-06-26 benni ("a" . "export ascii")
397 cd826e3e 2023-06-26 benni ("C" . "comment")
398 cd826e3e 2023-06-26 benni ("e" . "example")
399 cd826e3e 2023-06-26 benni ("E" . "export")
400 cd826e3e 2023-06-26 benni ("h" . "export html")
401 cd826e3e 2023-06-26 benni ("l" . "export latex")
402 cd826e3e 2023-06-26 benni ("q" . "quote")
403 cd826e3e 2023-06-26 benni ("s" . "src")
404 cd826e3e 2023-06-26 benni ("v" . "verse"))))
405 cd826e3e 2023-06-26 benni #+end_src
406 cd826e3e 2023-06-26 benni
407 cd826e3e 2023-06-26 benni ** org-bullets
408 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
409 cd826e3e 2023-06-26 benni (use-package org-bullets
410 cd826e3e 2023-06-26 benni :after org
411 cd826e3e 2023-06-26 benni :hook (org-mode . org-bullets-mode)
412 cd826e3e 2023-06-26 benni :custom
413 cd826e3e 2023-06-26 benni (org-bullets-bullet-list '("◉" "○" "●" "○" "●" "○" "●")))
414 cd826e3e 2023-06-26 benni #+end_src
415 cd826e3e 2023-06-26 benni
416 59a3509f 2023-10-06 benni ** org-babel
417 59a3509f 2023-10-06 benni #+begin_src emacs-lisp
418 59a3509f 2023-10-06 benni (use-package ob-rust)
419 59a3509f 2023-10-06 benni (org-babel-do-load-languages 'org-babel-load-languages '((shell . t)
420 59a3509f 2023-10-06 benni (gnuplot . t)
421 59a3509f 2023-10-06 benni (C . t)
422 59a3509f 2023-10-06 benni (rust . t)
423 59a3509f 2023-10-06 benni (haskell . t)
424 59a3509f 2023-10-06 benni (java . t)))
425 59a3509f 2023-10-06 benni #+end_src
426 cd826e3e 2023-06-26 benni * Development
427 cd826e3e 2023-06-26 benni ** lsp-mode
428 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
429 cd826e3e 2023-06-26 benni (use-package lsp-mode
430 cd826e3e 2023-06-26 benni :commands (lsp lsp-deferred)
431 cd826e3e 2023-06-26 benni :init
432 cd826e3e 2023-06-26 benni (setq lsp-keymap-prefix "C-c l")
433 cd826e3e 2023-06-26 benni :config
434 cd826e3e 2023-06-26 benni (lsp-enable-which-key-integration t))
435 cd826e3e 2023-06-26 benni
436 cd826e3e 2023-06-26 benni (use-package lsp-ui
437 cd826e3e 2023-06-26 benni :hook (lsp-mode . lsp-ui-mode)
438 cd826e3e 2023-06-26 benni :custom
439 cd826e3e 2023-06-26 benni (lsp-ui-doc-position 'bottom))
440 cd826e3e 2023-06-26 benni
441 cd826e3e 2023-06-26 benni (use-package lsp-treemacs
442 cd826e3e 2023-06-26 benni :after (lsp treemacs))
443 cd826e3e 2023-06-26 benni
444 cd826e3e 2023-06-26 benni (use-package lsp-ivy
445 cd826e3e 2023-06-26 benni :after (lsp ivy))
446 cd826e3e 2023-06-26 benni
447 cd826e3e 2023-06-26 benni (add-hook 'c-mode-hook 'lsp)
448 cd826e3e 2023-06-26 benni (add-hook 'c++-mode-hook 'lsp)
449 cd826e3e 2023-06-26 benni #+end_src
450 cd826e3e 2023-06-26 benni ** Indentation Style
451 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
452 cd826e3e 2023-06-26 benni (add-hook 'c-mode-hook
453 cd826e3e 2023-06-26 benni (lambda ()
454 cd826e3e 2023-06-26 benni (setq c-default-style "linux"
455 cd826e3e 2023-06-26 benni indent-tabs-mode t)))
456 cd826e3e 2023-06-26 benni (add-hook 'c-mode-hook 'c-guess)
457 cd826e3e 2023-06-26 benni #+end_src
458 cd826e3e 2023-06-26 benni ** Editorconfig
459 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
460 cd826e3e 2023-06-26 benni (use-package editorconfig
461 cd826e3e 2023-06-26 benni :defer 1
462 cd826e3e 2023-06-26 benni :config
463 cd826e3e 2023-06-26 benni (editorconfig-mode 1))
464 cd826e3e 2023-06-26 benni #+end_src
465 cd826e3e 2023-06-26 benni ** CompilerExplorer
466 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
467 cd826e3e 2023-06-26 benni ;; (use-package compiler-explorer
468 cd826e3e 2023-06-26 benni ;; :commands (compiler-explorer))
469 cd826e3e 2023-06-26 benni #+end_src
470 cd826e3e 2023-06-26 benni ** Rust
471 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
472 cd826e3e 2023-06-26 benni (add-to-list 'exec-path "~/.cargo/bin")
473 cd826e3e 2023-06-26 benni
474 cd826e3e 2023-06-26 benni (use-package rust-mode
475 cd826e3e 2023-06-26 benni :mode "\\.rs\\'")
476 cd826e3e 2023-06-26 benni
477 cd826e3e 2023-06-26 benni (use-package rustic
478 cd826e3e 2023-06-26 benni :after rust-mode
479 cd826e3e 2023-06-26 benni :bind (:map rustic-mode-map
480 cd826e3e 2023-06-26 benni ("C-c r" . rustic-cargo-run)
481 cd826e3e 2023-06-26 benni ("C-c b" . rustic-cargo-build)
482 cd826e3e 2023-06-26 benni ("C-c t" . rustic-cargo-test)))
483 cd826e3e 2023-06-26 benni
484 cd826e3e 2023-06-26 benni (use-package cargo
485 cd826e3e 2023-06-26 benni :after rust-mode
486 cd826e3e 2023-06-26 benni :init
487 cd826e3e 2023-06-26 benni (add-hook 'rust-mode-hook 'cargo-minor-mode)
488 cd826e3e 2023-06-26 benni (add-hook 'toml-mode-hook 'cargo-minor-mode))
489 cd826e3e 2023-06-26 benni #+end_src
490 59a3509f 2023-10-06 benni ** Java
491 59a3509f 2023-10-06 benni #+begin_src emacs-lisp
492 59a3509f 2023-10-06 benni (use-package lsp-java
493 59a3509f 2023-10-06 benni :after lsp-mode
494 59a3509f 2023-10-06 benni :config
495 59a3509f 2023-10-06 benni (add-hook 'java-mode-hook 'lsp))
496 59a3509f 2023-10-06 benni #+end_src
497 6a4b6d36 2023-10-24 benni ** Haskell
498 6a4b6d36 2023-10-24 benni #+begin_src emacs-lisp
499 6a4b6d36 2023-10-24 benni (use-package haskell-mode
500 6a4b6d36 2023-10-24 benni :mode "\\.hs\\'")
501 6a4b6d36 2023-10-24 benni
502 6a4b6d36 2023-10-24 benni (use-package lsp-haskell
503 6a4b6d36 2023-10-24 benni :init
504 6a4b6d36 2023-10-24 benni (add-hook 'haskell-mode-hook 'lsp)
505 6a4b6d36 2023-10-24 benni (add-hook 'haskell-mode-hook 'haskell-indent-mode)
506 6a4b6d36 2023-10-24 benni (add-hook 'haskell-literate-mode-hook 'lsp))
507 6a4b6d36 2023-10-24 benni #+end_src
508 6dc441b6 2023-10-24 benni ** Verilog
509 6dc441b6 2023-10-24 benni #+begin_src emacs-lisp
510 6dc441b6 2023-10-24 benni (use-package verilog-mode
511 6dc441b6 2023-10-24 benni :defer t
512 6dc441b6 2023-10-24 benni :config
513 6dc441b6 2023-10-24 benni (require 'lsp)
514 6dc441b6 2023-10-24 benni (lsp-register-client
515 6dc441b6 2023-10-24 benni (make-lsp-client :new-connection (lsp-stdio-connection '("svls"))
516 6dc441b6 2023-10-24 benni :major-modes '(verilog-mode)
517 6dc441b6 2023-10-24 benni :priority -1))
518 6dc441b6 2023-10-24 benni :hook (verilog-mode . (lambda ()
519 6dc441b6 2023-10-24 benni (lsp)
520 6dc441b6 2023-10-24 benni (flycheck-mode t)
521 6dc441b6 2023-10-24 benni (add-to-list 'lsp-language-id-configuration '(verilog-mode . "verilog")))))
522 6dc441b6 2023-10-24 benni #+end_src
523 cd826e3e 2023-06-26 benni * Mail
524 cd826e3e 2023-06-26 benni #+begin_src emacs-lisp
525 cd826e3e 2023-06-26 benni (use-package mu4e
526 cd826e3e 2023-06-26 benni :defer 10
527 cd826e3e 2023-06-26 benni :ensure nil
528 cd826e3e 2023-06-26 benni :commands (mu4e)
529 cd826e3e 2023-06-26 benni ;; :load-path "/usr/local/share/emacs/site-lisp/mu4e/"
530 cd826e3e 2023-06-26 benni :config
531 cd826e3e 2023-06-26 benni (setq mu4e-change-filenames-when-moving t
532 cd826e3e 2023-06-26 benni mu4e-update-interval (* 10 60)
533 cd826e3e 2023-06-26 benni mu4e-get-mail-command "mbsync -a"
534 cd826e3e 2023-06-26 benni mu4e-maildir "~/Mail/benni@stuerz.xyz"
535 cd826e3e 2023-06-26 benni mu4e-drafts-folder "/Drafts"
536 cd826e3e 2023-06-26 benni mu4e-sent-folder "/Sent"
537 cd826e3e 2023-06-26 benni mu4e-trash-folder "/Trash"
538 cd826e3e 2023-06-26 benni mu4e-maildir-shortcuts
539 cd826e3e 2023-06-26 benni '(("/Inbox" . ?i)
540 cd826e3e 2023-06-26 benni ("/Sent" . ?s)
541 cd826e3e 2023-06-26 benni ("/Trash" . ?t)
542 cd826e3e 2023-06-26 benni ("/Drafts" . ?d)
543 cd826e3e 2023-06-26 benni ("/openbsd" . ?O)))
544 cd826e3e 2023-06-26 benni (mu4e t))
545 cd826e3e 2023-06-26 benni #+end_src