summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/guix/manifests/emacs.scm76
-rw-r--r--Emacs.org369
2 files changed, 373 insertions, 72 deletions
diff --git a/.config/guix/manifests/emacs.scm b/.config/guix/manifests/emacs.scm
new file mode 100644
index 0000000..b4f3e8e
--- /dev/null
+++ b/.config/guix/manifests/emacs.scm
@@ -0,0 +1,76 @@
1(specifications->manifest
2 '("emacs"
3 "emacs-exwm"
4 ;;"emacs-native-comp"
5
6 "emacs-general"
7
8 "emacs-undo-tree"
9 "emacs-evil"
10 "emacs-evil-collection"
11
12 "emacs-diminish"
13 "emacs-doom-themes"
14 "font-hack"
15
16 "emacs-hl-todo"
17
18 "emacs-counsel"
19 "emacs-ivy"
20
21 "emacs-which-key"
22
23 "emacs-doom-modeline"
24
25 "emacs-hydra"
26
27 "emacs-beacon"
28
29 "emacs-org"
30
31 "emacs-evil-org"
32
33 "emacs-toc-org"
34
35 "emacs-visual-fill-column"
36
37 "emacs-org-superstar"
38
39 "emacs-org-roam"
40
41 "emacs-lsp-mode"
42 "emacs-lsp-ivy"
43
44 "emacs-pyvenv"
45 ;; "emacs-python-mode"
46
47 "emacs-typescript-mode"
48 "emacs-web-mode"
49 "emacs-tide"
50 "emacs-flycheck"
51
52 "emacs-yaml-mode"
53
54 "emacs-docker"
55
56 "emacs-company"
57
58 "emacs-projectile"
59
60 "emacs-neotree"
61
62 "emacs-magit"
63
64 "emacs-vterm"
65
66 ; "emacs-dired-single"
67 "emacs-dired-hacks"
68 "emacs-all-the-icons-dired"
69
70 "emacs-emms"
71
72 "emacs-pdf-tools"
73
74 "emacs-elfeed"
75
76))
diff --git a/Emacs.org b/Emacs.org
index 77bfefa..3862155 100644
--- a/Emacs.org
+++ b/Emacs.org
@@ -1,4 +1,4 @@
1#+title: Emacs Configuration 1
2#+author: jdlugosz963 2#+author: jdlugosz963
3#+PROPERTY: header-args:emacs-lisp :tangle .config/emacs/init.el 3#+PROPERTY: header-args:emacs-lisp :tangle .config/emacs/init.el
4 4
@@ -8,12 +8,12 @@
8- [[#user-information-setup][User information setup]] 8- [[#user-information-setup][User information setup]]
9- [[#stay-clean][Stay clean]] 9- [[#stay-clean][Stay clean]]
10- [[#package-setup][Package setup]] 10- [[#package-setup][Package setup]]
11- [[#update-path][Update Path]]
12- [[#keboard-setup][Keboard Setup]] 11- [[#keboard-setup][Keboard Setup]]
13 - [[#general-setup][General Setup]] 12 - [[#general-setup][General Setup]]
14 - [[#evil-mode-setup][Evil mode setup]] 13 - [[#evil-mode-setup][Evil mode setup]]
15- [[#ui-configuration][UI Configuration]] 14- [[#ui-configuration][UI Configuration]]
16 - [[#basic-ui-setup][Basic UI setup]] 15 - [[#basic-ui-setup][Basic UI setup]]
16 - [[#hl-todo][Hl todo]]
17 - [[#ivy-and-counsel][Ivy and Counsel]] 17 - [[#ivy-and-counsel][Ivy and Counsel]]
18 - [[#which-key][Which key]] 18 - [[#which-key][Which key]]
19 - [[#modline][Modline]] 19 - [[#modline][Modline]]
@@ -32,7 +32,6 @@
32 - [[#org-roam][Org roam]] 32 - [[#org-roam][Org roam]]
33- [[#development][Development]] 33- [[#development][Development]]
34 - [[#languages][Languages]] 34 - [[#languages][Languages]]
35 - [[#dap-mode][Dap mode]]
36 - [[#company][Company]] 35 - [[#company][Company]]
37 - [[#projectile][Projectile]] 36 - [[#projectile][Projectile]]
38 - [[#neotree][Neotree]] 37 - [[#neotree][Neotree]]
@@ -45,6 +44,7 @@
45 - [[#mu4e][Mu4e]] 44 - [[#mu4e][Mu4e]]
46 - [[#rss][RSS]] 45 - [[#rss][RSS]]
47- [[#runtime-performance][Runtime Performance]] 46- [[#runtime-performance][Runtime Performance]]
47- [[#emacs-manifest][Emacs Manifest]]
48 48
49* Startup Performance 49* Startup Performance
50 50
@@ -102,29 +102,25 @@
102 102
103#+begin_src emacs-lisp 103#+begin_src emacs-lisp
104 104
105 (require 'package) 105 (require 'package)
106 (setq package-archives '(("melpa" . "https://melpa.org/packages/") 106 (setq package-archives '(("melpa" . "https://melpa.org/packages/")
107 ("org" . "https://orgmode.org/elpa/") 107 ("org" . "https://orgmode.org/elpa/")
108 ("gnu-devel" . "https://elpa.gnu.org/devel/") 108 ("gnu-devel" . "https://elpa.gnu.org/devel/")
109 ("elpa" . "https://elpa.gnu.org/packages/"))) 109 ("elpa" . "https://elpa.gnu.org/packages/")))
110 (package-initialize) 110 (package-initialize)
111
112 (unless package-archive-contents
113 (package-refresh-contents))
114 111
115 (unless (package-installed-p 'use-package) 112 (unless package-archive-contents
116 (package-install 'use-package)) 113 (package-refresh-contents))
117 114
118 (setq use-package-always-ensure t) 115 (unless (package-installed-p 'use-package)
116 (package-install 'use-package))
119 117
120 (require 'use-package) 118 ;; (setq use-package-always-ensure t)
121 119
122#+end_src 120 (add-to-list 'load-path ".config/emacs/jd/")
123 121
124* Update Path 122 (require 'use-package)
125 123
126#+begin_src emacs-lisp
127 (push ".config/emacs/jd/" load-path)
128#+end_src 124#+end_src
129 125
130* Keboard Setup 126* Keboard Setup
@@ -144,6 +140,14 @@
144 140
145#+end_src 141#+end_src
146 142
143*Guix Packages*
144
145#+begin_src scheme :noweb-ref packages :noweb-sep ""
146
147 "emacs-general"
148
149#+end_src
150
147** Evil mode setup 151** Evil mode setup
148 152
149#+begin_src emacs-lisp 153#+begin_src emacs-lisp
@@ -174,16 +178,19 @@
174 178
175#+end_src 179#+end_src
176 180
177*** Keybinds 181*Guix Packages*
178 182
179#+begin_src emacs-lisp 183#+begin_src scheme :noweb-ref packages :noweb-sep ""
180 184
181 (defhydra hydra-resize-window (:timeout 4) 185 "emacs-undo-tree"
182 ("h" evil-window-decrease-width "<") 186 "emacs-evil"
183 ("l" evil-window-increase-width ">") 187 "emacs-evil-collection"
184 ("k" evil-window-decrease-height "^") 188
185 ("j" evil-window-increase-height "v") 189#+end_src
186 ("q" nil "finished" :exit t)) 190
191*Keybinds*
192
193#+begin_src emacs-lisp
187 194
188 (jd/leader-key-def 195 (jd/leader-key-def
189 "w" 'evil-window-map 196 "w" 'evil-window-map
@@ -225,7 +232,18 @@
225 232
226#+end_src 233#+end_src
227 234
228** 235*Guix Packages*
236
237#+begin_src scheme :noweb-ref packages :noweb-sep ""
238
239 "emacs-diminish"
240 "emacs-doom-themes"
241 "font-hack"
242
243#+end_src
244
245** Hl todo
246
229#+begin_src emacs-lisp 247#+begin_src emacs-lisp
230 248
231 (use-package hl-todo 249 (use-package hl-todo
@@ -238,6 +256,15 @@
238 (global-hl-todo-mode 1)) 256 (global-hl-todo-mode 1))
239 257
240#+end_src 258#+end_src
259
260*Guix Packages*
261
262#+begin_src scheme :noweb-ref packages :noweb-sep ""
263
264 "emacs-hl-todo"
265
266#+end_src
267
241** Ivy and Counsel 268** Ivy and Counsel
242 269
243#+begin_src emacs-lisp 270#+begin_src emacs-lisp
@@ -266,7 +293,16 @@
266 293
267#+end_src 294#+end_src
268 295
269*** Keybinds 296*Guix Packages*
297
298#+begin_src scheme :noweb-ref packages :noweb-sep ""
299
300 "emacs-counsel"
301 "emacs-ivy"
302
303#+end_src
304
305*Keybinds*
270 306
271#+begin_src emacs-lisp 307#+begin_src emacs-lisp
272 308
@@ -294,6 +330,14 @@
294 330
295#+end_src 331#+end_src
296 332
333*Guix Packages*
334
335#+begin_src scheme :noweb-ref packages :noweb-sep ""
336
337 "emacs-which-key"
338
339#+end_src
340
297** Modline 341** Modline
298 342
299#+begin_src emacs-lisp 343#+begin_src emacs-lisp
@@ -306,6 +350,14 @@
306 350
307#+end_src 351#+end_src
308 352
353*Guix Packages*
354
355#+begin_src scheme :noweb-ref packages :noweb-sep ""
356
357 "emacs-doom-modeline"
358
359#+end_src
360
309** Hydra 361** Hydra
310 362
311#+begin_src emacs-lisp 363#+begin_src emacs-lisp
@@ -323,6 +375,13 @@
323 (let ((old-face-attribute (face-attribute 'default :height))) 375 (let ((old-face-attribute (face-attribute 'default :height)))
324 (set-face-attribute 'default nil :height (- old-face-attribute 10)))) 376 (set-face-attribute 'default nil :height (- old-face-attribute 10))))
325 377
378 (defhydra hydra-resize-window (:timeout 4)
379 ("h" evil-window-decrease-width "<")
380 ("l" evil-window-increase-width ">")
381 ("k" evil-window-decrease-height "^")
382 ("j" evil-window-increase-height "v")
383 ("q" nil "finished" :exit t))
384
326 (defhydra hydra-text-scale-global (:timeout 4) 385 (defhydra hydra-text-scale-global (:timeout 4)
327 "scale text" 386 "scale text"
328 ("j" jd/text-scale-increase "in") 387 ("j" jd/text-scale-increase "in")
@@ -341,6 +400,14 @@
341 400
342#+end_src 401#+end_src
343 402
403*Guix Packages*
404
405#+begin_src scheme :noweb-ref packages :noweb-sep ""
406
407 "emacs-hydra"
408
409#+end_src
410
344** Beacon 411** Beacon
345 412
346#+begin_src emacs-lisp 413#+begin_src emacs-lisp
@@ -351,6 +418,14 @@
351 418
352#+end_src 419#+end_src
353 420
421*Guix Packages*
422
423#+begin_src scheme :noweb-ref packages :noweb-sep ""
424
425 "emacs-beacon"
426
427#+end_src
428
354** Other Keybindings 429** Other Keybindings
355*** Files 430*** Files
356 431
@@ -440,7 +515,15 @@
440 515
441#+end_src 516#+end_src
442 517
443*** Keybinds 518*Guix Packages*
519
520#+begin_src scheme :noweb-ref packages :noweb-sep ""
521
522 "emacs-org"
523
524#+end_src
525
526*Keybinds*
444 527
445#+begin_src emacs-lisp 528#+begin_src emacs-lisp
446 529
@@ -466,6 +549,14 @@
466 549
467#+end_src 550#+end_src
468 551
552*Guix Packages*
553
554#+begin_src scheme :noweb-ref packages :noweb-sep ""
555
556 "emacs-evil-org"
557
558#+end_src
559
469** Org make toc 560** Org make toc
470 561
471#+begin_src emacs-lisp 562#+begin_src emacs-lisp
@@ -476,6 +567,14 @@
476 567
477#+end_src 568#+end_src
478 569
570*Guix Packages*
571
572#+begin_src scheme :noweb-ref packages :noweb-sep ""
573
574 "emacs-toc-org"
575
576#+end_src
577
479** Org fonts 578** Org fonts
480 579
481#+begin_src emacs-lisp 580#+begin_src emacs-lisp
@@ -498,7 +597,7 @@
498 (set-face-attribute (car face) nil :font "Monospace" :weight 'Bold :height (cdr face))) 597 (set-face-attribute (car face) nil :font "Monospace" :weight 'Bold :height (cdr face)))
499 598
500 ;; Ensure that anything that should be fixed-pitch in Org files appears that way 599 ;; Ensure that anything that should be fixed-pitch in Org files appears that way
501 (set-face-attribute 'org-block nil :font "mononoki Nerd Font" :inherit 'fixed-pitch) 600 ;; (set-face-attribute 'org-block nil :font "mononoki Nerd Font" :inherit 'fixed-pitch)
502 (set-face-attribute 'org-table nil :inherit 'fixed-pitch) 601 (set-face-attribute 'org-table nil :inherit 'fixed-pitch)
503 (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) 602 (set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
504 (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) 603 (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
@@ -576,6 +675,14 @@
576 675
577#+end_src 676#+end_src
578 677
678*Guix Packages*
679
680#+begin_src scheme :noweb-ref packages :noweb-sep ""
681
682 "emacs-visual-fill-column"
683
684#+end_src
685
579** Org superstar 686** Org superstar
580 687
581#+begin_src emacs-lisp 688#+begin_src emacs-lisp
@@ -589,6 +696,14 @@
589 696
590#+end_src 697#+end_src
591 698
699*Guix Packages*
700
701#+begin_src scheme :noweb-ref packages :noweb-sep ""
702
703 "emacs-org-superstar"
704
705#+end_src
706
592** Org roam 707** Org roam
593 708
594#+begin_src emacs-lisp 709#+begin_src emacs-lisp
@@ -626,6 +741,14 @@
626 741
627#+end_src 742#+end_src
628 743
744*Guix Packages*
745
746#+begin_src scheme :noweb-ref packages :noweb-sep ""
747
748 "emacs-org-roam"
749
750#+end_src
751
629* Development 752* Development
630** Languages 753** Languages
631 754
@@ -648,6 +771,15 @@
648 771
649#+end_src 772#+end_src
650 773
774*Guix Packages*
775
776#+begin_src scheme :noweb-ref packages :noweb-sep ""
777
778 "emacs-lsp-mode"
779 "emacs-lsp-ivy"
780
781#+end_src
782
651*** Python 783*** Python
652 784
653#+begin_src emacs-lisp 785#+begin_src emacs-lisp
@@ -658,24 +790,27 @@
658 (pyvenv-activate project-venv-path) 790 (pyvenv-activate project-venv-path)
659 (pyvenv-mode)))) 791 (pyvenv-mode))))
660 792
661 (use-package python-mode 793;; (use-package python-mode ;;TODO: find alternative
662 :hook (python-mode . lsp-deferred) 794;; :hook (python-mode . lsp-deferred)
663 :hook (python-mode . jd/python-mode-setup) 795;; :hook (python-mode . jd/python-mode-setup)
664 :config 796;; :config
665 (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))) 797;; (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)))
666 798
667 (use-package pyvenv 799 (use-package pyvenv
668 :after python-mode) 800 :after python-mode)
669 801
670 (use-package django-mode 802#+end_src
671 :config 803
672 ;; Remove all django-mode objects from auto-mode-alist 804*Guix Packages*
673 (while (rassq 'django-mode auto-mode-alist) 805
674 (let ((django-mode-object (rassq 'django-mode auto-mode-alist))) 806#+begin_src scheme :noweb-ref packages :noweb-sep ""
675 (setq auto-mode-alist (delete django-mode-object auto-mode-alist))))) 807
808 "emacs-pyvenv"
809 ;; "emacs-python-mode"
676 810
677#+end_src 811#+end_src
678 812
813
679*** TypeScript 814*** TypeScript
680 815
681#+begin_src emacs-lisp 816#+begin_src emacs-lisp
@@ -718,6 +853,17 @@
718 853
719#+end_src 854#+end_src
720 855
856*Guix Packages*
857
858#+begin_src scheme :noweb-ref packages :noweb-sep ""
859
860 "emacs-typescript-mode"
861 "emacs-web-mode"
862 "emacs-tide"
863 "emacs-flycheck"
864
865#+end_src
866
721*** Yaml 867*** Yaml
722 868
723#+begin_src emacs-lisp 869#+begin_src emacs-lisp
@@ -726,6 +872,14 @@
726 872
727#+end_src 873#+end_src
728 874
875*Guix Packages*
876
877#+begin_src scheme :noweb-ref packages :noweb-sep ""
878
879 "emacs-yaml-mode"
880
881#+end_src
882
729*** Docker 883*** Docker
730 884
731#+begin_src emacs-lisp 885#+begin_src emacs-lisp
@@ -734,38 +888,22 @@
734 888
735#+end_src 889#+end_src
736 890
737**** Keybinds 891*Guix Packages*
738 892
739#+begin_src emacs-lisp 893#+begin_src scheme :noweb-ref packages :noweb-sep ""
740 894
741 (jd/leader-key-def 895 "emacs-docker"
742 "d" '(:ignore t :which-key "Docker")
743 "dc" '(docker-containers :which-key "Docker containers")
744 "dd" '(docker :which-key "Docker"))
745 896
746#+end_src 897#+end_src
747 898
748** Dap mode 899*Keybinds*
749 900
750#+begin_src emacs-lisp 901#+begin_src emacs-lisp
751 902
752 (use-package dap-mode 903 (jd/leader-key-def
753 ;; Uncomment the config below if you want all UI panes to be hidden by default! 904 "d" '(:ignore t :which-key "Docker")
754 ;; :custom 905 "dc" '(docker-containers :which-key "Docker containers")
755 ;; (lsp-enable-dap-auto-configure nil) 906 "dd" '(docker :which-key "Docker"))
756 ;; :config
757 ;; (dap-ui-mode 1)
758 :commands dap-debug
759 :config
760 ;; Set up Node debugging
761 (require 'dap-node)
762 (dap-node-setup) ;; Automatically installs Node debug adapter if needed
763
764 ;; Bind `C-c l d` to `dap-hydra` for easy access
765 (general-define-key
766 :keymaps 'lsp-mode-map
767 :prefix lsp-keymap-prefix
768 "d" '(dap-hydra t :wk "debugger")))
769 907
770#+end_src 908#+end_src
771 909
@@ -791,6 +929,14 @@
791 929
792#+end_src 930#+end_src
793 931
932*Guix Packages*
933
934#+begin_src scheme :noweb-ref packages :noweb-sep ""
935
936 "emacs-company"
937
938#+end_src
939
794** Projectile 940** Projectile
795 941
796#+begin_src emacs-lisp 942#+begin_src emacs-lisp
@@ -807,7 +953,15 @@
807 953
808#+end_src 954#+end_src
809 955
810*** Keybinds 956*Guix Packages*
957
958#+begin_src scheme :noweb-ref packages :noweb-sep ""
959
960 "emacs-projectile"
961
962#+end_src
963
964*Keybinds*
811 965
812#+begin_src emacs-lisp 966#+begin_src emacs-lisp
813 967
@@ -850,7 +1004,15 @@
850 1004
851#+end_src 1005#+end_src
852 1006
853*** Keybinds 1007*Guix Packages*
1008
1009#+begin_src scheme :noweb-ref packages :noweb-sep ""
1010
1011 "emacs-neotree"
1012
1013#+end_src
1014
1015*Keybinds*
854 1016
855#+begin_src emacs-lisp 1017#+begin_src emacs-lisp
856 1018
@@ -869,7 +1031,15 @@
869 1031
870#+end_src 1032#+end_src
871 1033
872*** Keybinds 1034*Guix Packages*
1035
1036#+begin_src scheme :noweb-ref packages :noweb-sep ""
1037
1038 "emacs-magit"
1039
1040#+end_src
1041
1042*Keybinds*
873 1043
874#+begin_src emacs-lisp 1044#+begin_src emacs-lisp
875 1045
@@ -900,7 +1070,15 @@
900 1070
901#+end_src 1071#+end_src
902 1072
903*** Keybinds 1073*Guix Packages*
1074
1075#+begin_src scheme :noweb-ref packages :noweb-sep ""
1076
1077 "emacs-vterm"
1078
1079#+end_src
1080
1081*Keybinds*
904 1082
905#+begin_src emacs-lisp 1083#+begin_src emacs-lisp
906 1084
@@ -939,6 +1117,16 @@
939 1117
940#+end_src 1118#+end_src
941 1119
1120*Guix Packages*
1121
1122#+begin_src scheme :noweb-ref packages :noweb-sep ""
1123
1124 ; "emacs-dired-single"
1125 "emacs-dired-hacks"
1126 "emacs-all-the-icons-dired"
1127
1128#+end_src
1129
942** EMMS 1130** EMMS
943 1131
944#+begin_src emacs-lisp 1132#+begin_src emacs-lisp
@@ -957,6 +1145,14 @@
957 1145
958#+end_src 1146#+end_src
959 1147
1148*Guix Packages*
1149
1150#+begin_src scheme :noweb-ref packages :noweb-sep ""
1151
1152 "emacs-emms"
1153
1154#+end_src
1155
960** PDF Tools 1156** PDF Tools
961 1157
962#+begin_src emacs-lisp 1158#+begin_src emacs-lisp
@@ -965,11 +1161,19 @@
965 1161
966#+end_src 1162#+end_src
967 1163
1164*Guix Packages*
1165
1166#+begin_src scheme :noweb-ref packages :noweb-sep ""
1167
1168 "emacs-pdf-tools"
1169
1170#+end_src
1171
968** Mu4e 1172** Mu4e
969- Load my [[./Mu4e.org][mu4e]] config 1173- Load my [[./Mu4e.org][mu4e]] config
970 1174
971#+begin_src emacs-lisp 1175#+begin_src emacs-lisp
972 (require 'jd-mu4e) 1176; (require 'jd-mu4e)
973#+end_src 1177#+end_src
974 1178
975** RSS 1179** RSS
@@ -983,8 +1187,29 @@
983 1187
984#+end_src 1188#+end_src
985 1189
1190*Guix Packages*
1191
1192#+begin_src scheme :noweb-ref packages :noweb-sep ""
1193
1194 "emacs-elfeed"
1195
1196#+end_src
1197
986* Runtime Performance 1198* Runtime Performance
987 1199
988#+begin_src emacs-lisp 1200#+begin_src emacs-lisp
989 (setq gc-cons-threshold (* 2 1000 1000)) 1201 (setq gc-cons-threshold (* 2 1000 1000))
990#+end_src 1202#+end_src
1203
1204* Emacs Manifest
1205
1206#+begin_src scheme :tangle .config/guix/manifests/emacs.scm :noweb yes
1207
1208 (specifications->manifest
1209 '("emacs"
1210 "emacs-exwm"
1211 ;;"emacs-native-comp"
1212 <<packages>>
1213 ))
1214
1215#+end_src