summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2024-11-02 20:33:07 +0200
committerGravatar Uko Kokņevičs2024-11-02 21:14:10 +0200
commit6c766f3cf6388b5a66749691dc264251ab52bb9f (patch)
tree421832b703b33d8957f3a05163e70d096e8c1984
parentReorder gnutls-algorithm-priority setting (diff)
downloademacs.d-6c766f3cf6388b5a66749691dc264251ab52bb9f.tar.gz
emacs.d-6c766f3cf6388b5a66749691dc264251ab52bb9f.tar.xz
emacs.d-6c766f3cf6388b5a66749691dc264251ab52bb9f.zip
Merge in work config
Diffstat (limited to '')
-rw-r--r--.gitignore7
-rw-r--r--init.el126
-rw-r--r--shared/custom.el3
3 files changed, 73 insertions, 63 deletions
diff --git a/.gitignore b/.gitignore
index d3326d6..daaa2be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,9 @@
1.cache/ 1.cache/
2auto-save-list/ 2auto-save-list/
3eln-cache/
3local/ 4local/
4straight/ \ No newline at end of file 5straight/
6transient/
7*~
8projectile-bookmarks.eld
9recentf
diff --git a/init.el b/init.el
index ed8b35f..67e1cdc 100644
--- a/init.el
+++ b/init.el
@@ -44,8 +44,8 @@
44;; Improve Emacs security somewhat 44;; Improve Emacs security somewhat
45(setq gnutls-min-prime-bits 3072 45(setq gnutls-min-prime-bits 3072
46 gnutls-verify-error (and (fboundp 'gnutls-available-p) 46 gnutls-verify-error (and (fboundp 'gnutls-available-p)
47 (gnutls-available-p) 47 (gnutls-available-p)
48 (not (getenv-internal "INSECURE"))) 48 (not (getenv-internal "INSECURE")))
49 tls-checktrust gnutls-verify-error 49 tls-checktrust gnutls-verify-error
50 tls-program '("openssl s_client -connect %h:%p -CAfile %t -nbio -no_ssl3 -no_tls1 -no_tls1_1 -ign_eof" 50 tls-program '("openssl s_client -connect %h:%p -CAfile %t -nbio -no_ssl3 -no_tls1 -no_tls1_1 -ign_eof"
51 "gnutls-cli -p %p --dh-bits=3072 --ocsp --x509cafile=%t --strict-tofu --priority='SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2:+VERS-TLS1.3' %h" 51 "gnutls-cli -p %p --dh-bits=3072 --ocsp --x509cafile=%t --strict-tofu --priority='SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2:+VERS-TLS1.3' %h"
@@ -83,7 +83,7 @@
83 83
84(setq read-process-output-max (* 64 1024)) 84(setq read-process-output-max (* 64 1024))
85 85
86;; Don't fontify if stuck on reading input anyways 86;; Don't fontify if stuck on reading input
87(setq redisplay-skip-fontification-on-input t) 87(setq redisplay-skip-fontification-on-input t)
88 88
89(when +windows+ 89(when +windows+
@@ -103,9 +103,9 @@
103 (bootstrap-version 6)) 103 (bootstrap-version 6))
104 (unless (file-exists-p bootstrap-file) 104 (unless (file-exists-p bootstrap-file)
105 (message "This might take a long time...") 105 (message "This might take a long time...")
106 (with-current-buffer (url-retrieve-synchronously 106 (with-current-buffer
107 "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" 107 (url-retrieve-synchronously "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
108 'inhibit-cookies) 108 'silent 'inhibit-cookies)
109 (goto-char (point-max)) 109 (goto-char (point-max))
110 (eval-print-last-sexp))) 110 (eval-print-last-sexp)))
111 (load bootstrap-file)) 111 (load bootstrap-file))
@@ -119,14 +119,16 @@
119 (let ((name (intern (concat "set-" (symbol-name name))))) 119 (let ((name (intern (concat "set-" (symbol-name name)))))
120 `(defun ,name (value &optional default) 120 `(defun ,name (value &optional default)
121 (if default 121 (if default
122 (progn 122 (progn
123 ,@(mapcar (lambda (name) `(setq-default ,name value)) emacs-names)) 123 ,@(mapcar (lambda (name) `(setq-default ,name value)) emacs-names))
124 ,@(mapcar (lambda (name) `(setq ,name value)) emacs-names))))) 124 ,@(mapcar (lambda (name) `(setq ,name value)) emacs-names)))))
125 125
126(defsetter fill-width fill-column) 126(defsetter fill-width fill-column)
127(defsetter tab-usage indent-tabs-mode) 127(defsetter tab-usage indent-tabs-mode)
128(defsetter tab-width c-basic-offset nasm-offset standard-indent tab-width) 128(defsetter tab-width c-basic-offset nasm-offset standard-indent tab-width)
129 129
130;; Miscellany
131
130(set-face-attribute 'default 132(set-face-attribute 'default
131 nil 133 nil
132 :font (if +mac+ "Fira Code Retina" "Fira Code") 134 :font (if +mac+ "Fira Code Retina" "Fira Code")
@@ -174,9 +176,8 @@
174 176
175(use-package centaur-tabs 177(use-package centaur-tabs
176 :straight t 178 :straight t
177 ;; Demanded because we have a hook to disable the mode locally but we want it to be global ASAP 179 :hook ((after-init . (lambda () (centaur-tabs-mode +1)))
178 :demand t 180 (dashboard-mode . (lambda () (centaur-tabs-local-mode +1))))
179 :hook ((dashboard-mode . (lambda () (centaur-tabs-local-mode +1))))
180 :bind (("C-x <C-right>" . centaur-tabs-forward) 181 :bind (("C-x <C-right>" . centaur-tabs-forward)
181 ("C-x <right>" . centaur-tabs-forward) 182 ("C-x <right>" . centaur-tabs-forward)
182 ("C-x <C-left>" . centaur-tabs-backward) 183 ("C-x <C-left>" . centaur-tabs-backward)
@@ -184,16 +185,14 @@
184 :custom 185 :custom
185 (centaur-tabs-style "alternate") 186 (centaur-tabs-style "alternate")
186 (centaur-tabs-height 35) 187 (centaur-tabs-height 35)
188 (centaur-tabs-icon-type 'nerd-icons)
187 (centaur-tabs-set-icons t) 189 (centaur-tabs-set-icons t)
188 (centaur-tabs-gray-out-icons 'buffer) 190 (centaur-tabs-gray-out-icons 'buffer)
189 (centaur-tabs-icon-type 'nerd-icons)
190 (centaur-tabs-set-bar 'over) 191 (centaur-tabs-set-bar 'over)
191 (centaur-tabs-set-close-button nil) 192 (centaur-tabs-set-close-button nil)
192 (centaur-tabs-set-modified-marker t) 193 (centaur-tabs-set-modified-marker t)
193 (centaur-tabs-modified-marker "●") 194 (centaur-tabs-modified-marker "●")
194 (centaur-tabs-cycle-scope 'tabs) 195 (centaur-tabs-cycle-scope 'tabs))
195 :config
196 (centaur-tabs-mode +1))
197 196
198(use-package cmake-ts-mode 197(use-package cmake-ts-mode
199 :after treesit 198 :after treesit
@@ -266,19 +265,13 @@
266 265
267(use-package display-fill-column-indicator 266(use-package display-fill-column-indicator
268 :straight '(display-fill-column-indicator :type built-in) 267 :straight '(display-fill-column-indicator :type built-in)
269 ;; Demanded because we have a hook to disable the mode locally but we want it to be global ASAP 268 :hook ((after-init . (lambda () (global-display-fill-column-indicator-mode +1)))
270 :demand t 269 (dashboard-mode . (lambda () (display-fill-column-indicator-mode -1)))))
271 :hook (dashboard-mode . (lambda () (display-fill-column-indicator-mode -1)))
272 :config
273 (global-display-fill-column-indicator-mode +1))
274 270
275(use-package display-line-numbers 271(use-package display-line-numbers
276 :straight '(display-line-numbers :type built-in) 272 :straight '(display-line-numbers :type built-in)
277 ;; Demanded because we have a hook to disable the mode locally but we want it to be global ASAP 273 :hook ((after-init . (lambda () (global-display-line-numbers-mode +1)))
278 :demand t 274 (help-mode . (lambda () (display-line-numbers-mode -1)))))
279 :hook (help-mode . (lambda () (display-line-numbers-mode -1)))
280 :config
281 (global-display-line-numbers-mode +1))
282 275
283(use-package dockerfile-ts-mode 276(use-package dockerfile-ts-mode
284 :after treesit 277 :after treesit
@@ -293,24 +286,11 @@
293 :config 286 :config
294 (doom-modeline-mode +1)) 287 (doom-modeline-mode +1))
295 288
296(use-package doom-themes 289(use-package catppuccin-theme
297 :straight t 290 :straight t
298 :custom
299 (doom-themes-enable-bold t)
300 (doom-themes-enable-italic t)
301 :config 291 :config
302 (load-theme 'doom-opera t) 292 (setq catppuccin-flavor 'latte)
303 293 (load-theme 'catppuccin t))
304 (use-package doom-themes-ext-org
305 :after org
306 :straight doom-themes
307 :config
308 (doom-themes-org-config))
309
310 (use-package doom-themes-ext-visual-bell
311 :straight doom-themes
312 :config
313 (doom-themes-visual-bell-config)))
314 294
315(use-package ebuild-mode 295(use-package ebuild-mode
316 :straight t 296 :straight t
@@ -368,7 +348,7 @@
368 :custom 348 :custom
369 (gcmh-idle-delay 'auto) 349 (gcmh-idle-delay 'auto)
370 (gcmh-auto-idle-delay-factor 10) 350 (gcmh-auto-idle-delay-factor 10)
371 (gcmh-high-cons-threshold 16777216) 351 (gcmh-high-cons-threshold (* 16 1024 1024))
372 :config 352 :config
373 (gcmh-mode +1)) 353 (gcmh-mode +1))
374 354
@@ -387,6 +367,12 @@
387 :mode "\\.go\\'" 367 :mode "\\.go\\'"
388 :hook (go-ts-mode . (lambda () (add-hook 'before-save-hook #'gofmt-before-save nil t)))) 368 :hook (go-ts-mode . (lambda () (add-hook 'before-save-hook #'gofmt-before-save nil t))))
389 369
370(use-package groovy-mode
371 :straight t
372 :mode ("Jenkinsfile\\'"
373 "\\.gradle\\'"
374 "\\.groovy\\'"))
375
390(use-package haskell-mode 376(use-package haskell-mode
391 :straight t 377 :straight t
392 :mode "\\.hs\\'") 378 :mode "\\.hs\\'")
@@ -409,16 +395,13 @@
409(use-package ivy 395(use-package ivy
410 :after (counsel swiper) 396 :after (counsel swiper)
411 :straight t 397 :straight t
412 ;; Demanded to enable ivy-mode globally ASAP. 398 :hook (after-init . (lambda () (ivy-mode +1)))
413 :demand t
414 :bind (("C-c r" . ivy-resume) 399 :bind (("C-c r" . ivy-resume)
415 ("C-c v" . ivy-push-view) 400 ("C-c v" . ivy-push-view)
416 ("C-c V" . ivy-pop-view)) 401 ("C-c V" . ivy-pop-view))
417 :custom 402 :custom
418 (ivy-use-virtual-buffers t) 403 (ivy-use-virtual-buffers t)
419 (ivy-count-format "(%d/%d) ") 404 (ivy-count-format "(%d/%d) "))
420 :config
421 (ivy-mode +1))
422 405
423(use-package java-ts-mode 406(use-package java-ts-mode
424 :after treesit 407 :after treesit
@@ -445,9 +428,11 @@
445 ;; TODO: Do some proper setup 428 ;; TODO: Do some proper setup
446 :straight t) 429 :straight t)
447 430
448(use-package make-mode 431(use-package makefile-mode
449 :straight '(make-mode :type built-in) 432 :straight '(makefile-mode :type built-in)
450 :mode ("Makefile\\'" . makefile-gmake-mode)) 433 :mode (("Makefile\\'" . makefile-gmake-mode)
434 "GNUmakefile\\'"
435 "\\.mk\\(\\.template\\)?\\'"))
451 436
452(use-package markdown-mode 437(use-package markdown-mode
453 :straight t 438 :straight t
@@ -480,6 +465,7 @@
480 (use-package htmlize 465 (use-package htmlize
481 :straight t) 466 :straight t)
482 :custom 467 :custom
468 (org-agenda-files '("~/TODO.org"))
483 (org-log-done t)) 469 (org-log-done t))
484 470
485(use-package php-mode 471(use-package php-mode
@@ -502,10 +488,32 @@
502 (prepend-prettify '((">=" . ?≥) 488 (prepend-prettify '((">=" . ?≥)
503 ("<=" . ?≤)))) 489 ("<=" . ?≤))))
504 (defun prettify-cc-modes () 490 (defun prettify-cc-modes ()
505 (prepend-prettify '(("->" . ?→)))) 491 (prepend-prettify '(("->" . ?→)
492 ("<<" . ?≪)
493 (">>" . ?≫)
494 ("==" . (?= (tc . bc) ??))
495 ("!=" . (?≠ (tc . bc) ??))
496 ("^" . ?⊕)
497 ("&&" . ?∧)
498 ("||" . ?∨)
499 ("<<=" . (?≪ (cr . cl) ?=))
500 (">>=" . (?≫ (cr . cl) ?=))
501 ("&=" . (?∩ (cr . cl) ?=))
502 ("|=" . (?∪ (cr . cl) ?=))
503 ("^=" . (?⊕ (cr . cl) ?=))
504 ("bool" . ?𝔹)
505 ("_Bool" . ?𝔹)
506 ("int" . ?ℤ)
507 ("float" . ?ℚ)
508 ("true" . ?𝕋)
509 ("_True" . ?𝕋)
510 ("false" . ?𝔽)
511 ("_False" . ?𝔽))))
506 (defun prettify-lisp-modes () 512 (defun prettify-lisp-modes ()
507 (prepend-prettify '(("lambda" . ?λ) 513 (prepend-prettify '(("lambda" . ?λ)
508 ("lambda*" . (?λ (cr . Bc) ?⋆))))) 514 ("lambda*" . (?λ (cr . Bc) ?⋆))
515 ("->" . ?→)
516 ("=>" . ?⇒))))
509 :hook (c-mode-common . prettify-cc-modes) 517 :hook (c-mode-common . prettify-cc-modes)
510 :hook (c-ts-base-mode . prettify-cc-modes) 518 :hook (c-ts-base-mode . prettify-cc-modes)
511 :hook (emacs-lisp-mode . prettify-lisp-modes) 519 :hook (emacs-lisp-mode . prettify-lisp-modes)
@@ -668,10 +676,6 @@ A thin wrapper around `xref-references-in-directory'."
668 :straight t 676 :straight t
669 :hook (prog-mode . (lambda () (rainbow-mode +1)))) 677 :hook (prog-mode . (lambda () (rainbow-mode +1))))
670 678
671(use-package ripgrep
672 :straight t
673 :commands (ripgrep-regexp))
674
675(use-package ruby-ts-mode 679(use-package ruby-ts-mode
676 :after treesit 680 :after treesit
677 :straight '(ruby-ts-mode :type built-in) 681 :straight '(ruby-ts-mode :type built-in)
@@ -784,11 +788,11 @@ A thin wrapper around `xref-references-in-directory'."
784 :straight t 788 :straight t
785 :mode "\\.typ\\'") 789 :mode "\\.typ\\'")
786 790
787(use-package zig-mode
788 :straight t
789 :mode "\\.zig\\'")
790
791(use-package yaml-ts-mode 791(use-package yaml-ts-mode
792 :after treesit 792 :after treesit
793 :straight '(yaml-ts-mode :type built-in) 793 :straight '(yaml-ts-mode :type built-in)
794 :mode "\\.ya?ml\\'") 794 :mode "\\.ya?ml\\'")
795
796(use-package zig-mode
797 :straight t
798 :mode "\\.zig\\'")
diff --git a/shared/custom.el b/shared/custom.el
index 42627c3..9af1d9f 100644
--- a/shared/custom.el
+++ b/shared/custom.el
@@ -4,7 +4,8 @@
4 ;; Your init file should contain only one such instance. 4 ;; Your init file should contain only one such instance.
5 ;; If there is more than one, they won't work right. 5 ;; If there is more than one, they won't work right.
6 '(custom-safe-themes 6 '(custom-safe-themes
7 '("7964b513f8a2bb14803e717e0ac0123f100fb92160dcf4a467f530868ebaae3e" default))) 7 '("7964b513f8a2bb14803e717e0ac0123f100fb92160dcf4a467f530868ebaae3e" default))
8 '(auth-source-save-behavior nil))
8(custom-set-faces 9(custom-set-faces
9 ;; custom-set-faces was added by Custom. 10 ;; custom-set-faces was added by Custom.
10 ;; If you edit it by hand, you could mess it up, so be careful. 11 ;; If you edit it by hand, you could mess it up, so be careful.