diff options
-rw-r--r-- | .config/emacs/init.el | 90 | ||||
-rw-r--r-- | Emacs.org | 22 |
2 files changed, 42 insertions, 70 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el index f4df588..011d660 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el | |||
@@ -27,23 +27,23 @@ | |||
27 | (setq user-emacs-directory "~/.cache/emacs") | 27 | (setq user-emacs-directory "~/.cache/emacs") |
28 | 28 | ||
29 | (require 'package) | 29 | (require 'package) |
30 | (setq package-archives '(("melpa" . "https://melpa.org/packages/") | 30 | (setq package-archives '(("melpa" . "https://melpa.org/packages/") |
31 | ("org" . "https://orgmode.org/elpa/") | 31 | ("org" . "https://orgmode.org/elpa/") |
32 | ("gnu-devel" . "https://elpa.gnu.org/devel/") | 32 | ("gnu-devel" . "https://elpa.gnu.org/devel/") |
33 | ("elpa" . "https://elpa.gnu.org/packages/"))) | 33 | ("elpa" . "https://elpa.gnu.org/packages/"))) |
34 | (package-initialize) | 34 | (package-initialize) |
35 | 35 | ||
36 | (unless package-archive-contents | 36 | (unless package-archive-contents |
37 | (package-refresh-contents)) | 37 | (package-refresh-contents)) |
38 | 38 | ||
39 | (unless (package-installed-p 'use-package) | 39 | (unless (package-installed-p 'use-package) |
40 | (package-install 'use-package)) | 40 | (package-install 'use-package)) |
41 | 41 | ||
42 | (setq use-package-always-ensure t) | 42 | ;; (setq use-package-always-ensure t) |
43 | 43 | ||
44 | (require 'use-package) | 44 | (add-to-list 'load-path ".config/emacs/jd/") |
45 | 45 | ||
46 | (push ".config/emacs/jd/" load-path) | 46 | (require 'use-package) |
47 | 47 | ||
48 | (use-package general | 48 | (use-package general |
49 | :config | 49 | :config |
@@ -79,13 +79,6 @@ | |||
79 | :config | 79 | :config |
80 | (evil-collection-init)) | 80 | (evil-collection-init)) |
81 | 81 | ||
82 | (defhydra hydra-resize-window (:timeout 4) | ||
83 | ("h" evil-window-decrease-width "<") | ||
84 | ("l" evil-window-increase-width ">") | ||
85 | ("k" evil-window-decrease-height "^") | ||
86 | ("j" evil-window-increase-height "v") | ||
87 | ("q" nil "finished" :exit t)) | ||
88 | |||
89 | (jd/leader-key-def | 82 | (jd/leader-key-def |
90 | "w" 'evil-window-map | 83 | "w" 'evil-window-map |
91 | "wr" '(hydra-resize-window/body :which-key "Rezize window") | 84 | "wr" '(hydra-resize-window/body :which-key "Rezize window") |
@@ -185,6 +178,13 @@ | |||
185 | (let ((old-face-attribute (face-attribute 'default :height))) | 178 | (let ((old-face-attribute (face-attribute 'default :height))) |
186 | (set-face-attribute 'default nil :height (- old-face-attribute 10)))) | 179 | (set-face-attribute 'default nil :height (- old-face-attribute 10)))) |
187 | 180 | ||
181 | (defhydra hydra-resize-window (:timeout 4) | ||
182 | ("h" evil-window-decrease-width "<") | ||
183 | ("l" evil-window-increase-width ">") | ||
184 | ("k" evil-window-decrease-height "^") | ||
185 | ("j" evil-window-increase-height "v") | ||
186 | ("q" nil "finished" :exit t)) | ||
187 | |||
188 | (defhydra hydra-text-scale-global (:timeout 4) | 188 | (defhydra hydra-text-scale-global (:timeout 4) |
189 | "scale text" | 189 | "scale text" |
190 | ("j" jd/text-scale-increase "in") | 190 | ("j" jd/text-scale-increase "in") |
@@ -303,7 +303,7 @@ | |||
303 | (set-face-attribute (car face) nil :font "Monospace" :weight 'Bold :height (cdr face))) | 303 | (set-face-attribute (car face) nil :font "Monospace" :weight 'Bold :height (cdr face))) |
304 | 304 | ||
305 | ;; Ensure that anything that should be fixed-pitch in Org files appears that way | 305 | ;; Ensure that anything that should be fixed-pitch in Org files appears that way |
306 | (set-face-attribute 'org-block nil :font "mononoki Nerd Font" :inherit 'fixed-pitch) | 306 | ;; (set-face-attribute 'org-block nil :font "mononoki Nerd Font" :inherit 'fixed-pitch) |
307 | (set-face-attribute 'org-table nil :inherit 'fixed-pitch) | 307 | (set-face-attribute 'org-table nil :inherit 'fixed-pitch) |
308 | (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) | 308 | (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) |
309 | (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) | 309 | (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) |
@@ -405,26 +405,19 @@ | |||
405 | :after lsp) | 405 | :after lsp) |
406 | 406 | ||
407 | (defun jd/python-mode-setup () | 407 | (defun jd/python-mode-setup () |
408 | (let ((project-venv-path (concat (projectile-project-root) "venv/"))) | 408 | (let ((project-venv-path (concat (projectile-project-root) "venv/"))) |
409 | (when (projectile--directory-p project-venv-path) | 409 | (when (projectile--directory-p project-venv-path) |
410 | (pyvenv-activate project-venv-path) | 410 | (pyvenv-activate project-venv-path) |
411 | (pyvenv-mode)))) | 411 | (pyvenv-mode)))) |
412 | |||
413 | (use-package python-mode | ||
414 | :hook (python-mode . lsp-deferred) | ||
415 | :hook (python-mode . jd/python-mode-setup) | ||
416 | :config | ||
417 | (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))) | ||
418 | 412 | ||
419 | (use-package pyvenv | 413 | ;; (use-package python-mode ;;TODO: find alternative |
420 | :after python-mode) | 414 | ;; :hook (python-mode . lsp-deferred) |
415 | ;; :hook (python-mode . jd/python-mode-setup) | ||
416 | ;; :config | ||
417 | ;; (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))) | ||
421 | 418 | ||
422 | (use-package django-mode | 419 | (use-package pyvenv |
423 | :config | 420 | :after python-mode) |
424 | ;; Remove all django-mode objects from auto-mode-alist | ||
425 | (while (rassq 'django-mode auto-mode-alist) | ||
426 | (let ((django-mode-object (rassq 'django-mode auto-mode-alist))) | ||
427 | (setq auto-mode-alist (delete django-mode-object auto-mode-alist))))) | ||
428 | 421 | ||
429 | (use-package typescript-mode | 422 | (use-package typescript-mode |
430 | :mode ("\\.ts\\'") | 423 | :mode ("\\.ts\\'") |
@@ -438,15 +431,12 @@ | |||
438 | (tide-hl-identifier-mode))) | 431 | (tide-hl-identifier-mode))) |
439 | 432 | ||
440 | (use-package tide | 433 | (use-package tide |
441 | :ensure t | ||
442 | :after (typescript-mode company web-mode)) | 434 | :after (typescript-mode company web-mode)) |
443 | 435 | ||
444 | (use-package flycheck | 436 | (use-package flycheck |
445 | :ensure t | ||
446 | :hook ((after-init . global-flycheck-mode))) | 437 | :hook ((after-init . global-flycheck-mode))) |
447 | 438 | ||
448 | (use-package web-mode | 439 | (use-package web-mode |
449 | :ensure t | ||
450 | :hook ((web-mode . jd/activate-tide-mode)) | 440 | :hook ((web-mode . jd/activate-tide-mode)) |
451 | :mode | 441 | :mode |
452 | ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") | 442 | ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") |
@@ -471,24 +461,6 @@ | |||
471 | "dc" '(docker-containers :which-key "Docker containers") | 461 | "dc" '(docker-containers :which-key "Docker containers") |
472 | "dd" '(docker :which-key "Docker")) | 462 | "dd" '(docker :which-key "Docker")) |
473 | 463 | ||
474 | (use-package dap-mode | ||
475 | ;; Uncomment the config below if you want all UI panes to be hidden by default! | ||
476 | ;; :custom | ||
477 | ;; (lsp-enable-dap-auto-configure nil) | ||
478 | ;; :config | ||
479 | ;; (dap-ui-mode 1) | ||
480 | :commands dap-debug | ||
481 | :config | ||
482 | ;; Set up Node debugging | ||
483 | (require 'dap-node) | ||
484 | (dap-node-setup) ;; Automatically installs Node debug adapter if needed | ||
485 | |||
486 | ;; Bind `C-c l d` to `dap-hydra` for easy access | ||
487 | (general-define-key | ||
488 | :keymaps 'lsp-mode-map | ||
489 | :prefix lsp-keymap-prefix | ||
490 | "d" '(dap-hydra t :wk "debugger"))) | ||
491 | |||
492 | (use-package company | 464 | (use-package company |
493 | :after lsp-mode | 465 | :after lsp-mode |
494 | :hook (lsp-mode . company-mode) | 466 | :hook (lsp-mode . company-mode) |
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | #+author: jdlugosz963 | 1 | #+author: jdlugosz963 |
3 | #+PROPERTY: header-args:emacs-lisp :tangle .config/emacs/init.el | 2 | #+PROPERTY: header-args:emacs-lisp :tangle .config/emacs/init.el |
4 | 3 | ||
@@ -8,7 +7,7 @@ | |||
8 | - [[#user-information-setup][User information setup]] | 7 | - [[#user-information-setup][User information setup]] |
9 | - [[#stay-clean][Stay clean]] | 8 | - [[#stay-clean][Stay clean]] |
10 | - [[#package-setup][Package setup]] | 9 | - [[#package-setup][Package setup]] |
11 | - [[#keboard-setup][Keboard Setup]] | 10 | - [[#keyboard-setup][Keyboard Setup]] |
12 | - [[#general-setup][General Setup]] | 11 | - [[#general-setup][General Setup]] |
13 | - [[#evil-mode-setup][Evil mode setup]] | 12 | - [[#evil-mode-setup][Evil mode setup]] |
14 | - [[#ui-configuration][UI Configuration]] | 13 | - [[#ui-configuration][UI Configuration]] |
@@ -73,7 +72,6 @@ | |||
73 | (add-hook 'emacs-startup-hook #'jd/startup) | 72 | (add-hook 'emacs-startup-hook #'jd/startup) |
74 | #+end_src | 73 | #+end_src |
75 | 74 | ||
76 | |||
77 | * User information setup | 75 | * User information setup |
78 | 76 | ||
79 | #+begin_src emacs-lisp | 77 | #+begin_src emacs-lisp |
@@ -123,7 +121,7 @@ | |||
123 | 121 | ||
124 | #+end_src | 122 | #+end_src |
125 | 123 | ||
126 | * Keboard Setup | 124 | * Keyboard Setup |
127 | ** General Setup | 125 | ** General Setup |
128 | 126 | ||
129 | #+begin_src emacs-lisp | 127 | #+begin_src emacs-lisp |
@@ -469,7 +467,6 @@ | |||
469 | #+end_src | 467 | #+end_src |
470 | 468 | ||
471 | * Org | 469 | * Org |
472 | |||
473 | ** Org-mode setup | 470 | ** Org-mode setup |
474 | 471 | ||
475 | #+begin_src emacs-lisp | 472 | #+begin_src emacs-lisp |
@@ -810,7 +807,6 @@ | |||
810 | 807 | ||
811 | #+end_src | 808 | #+end_src |
812 | 809 | ||
813 | |||
814 | *** TypeScript | 810 | *** TypeScript |
815 | 811 | ||
816 | #+begin_src emacs-lisp | 812 | #+begin_src emacs-lisp |
@@ -827,15 +823,12 @@ | |||
827 | (tide-hl-identifier-mode))) | 823 | (tide-hl-identifier-mode))) |
828 | 824 | ||
829 | (use-package tide | 825 | (use-package tide |
830 | :ensure t | ||
831 | :after (typescript-mode company web-mode)) | 826 | :after (typescript-mode company web-mode)) |
832 | 827 | ||
833 | (use-package flycheck | 828 | (use-package flycheck |
834 | :ensure t | ||
835 | :hook ((after-init . global-flycheck-mode))) | 829 | :hook ((after-init . global-flycheck-mode))) |
836 | 830 | ||
837 | (use-package web-mode | 831 | (use-package web-mode |
838 | :ensure t | ||
839 | :hook ((web-mode . jd/activate-tide-mode)) | 832 | :hook ((web-mode . jd/activate-tide-mode)) |
840 | :mode | 833 | :mode |
841 | ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") | 834 | ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") |
@@ -1173,7 +1166,15 @@ | |||
1173 | - Load my [[./Mu4e.org][mu4e]] config | 1166 | - Load my [[./Mu4e.org][mu4e]] config |
1174 | 1167 | ||
1175 | #+begin_src emacs-lisp | 1168 | #+begin_src emacs-lisp |
1176 | ; (require 'jd-mu4e) | 1169 | (require 'jd-mu4e) |
1170 | #+end_src | ||
1171 | |||
1172 | *Guix Packages* | ||
1173 | |||
1174 | #+begin_src scheme :noweb-ref packages :noweb-sep "" | ||
1175 | |||
1176 | "mu" | ||
1177 | |||
1177 | #+end_src | 1178 | #+end_src |
1178 | 1179 | ||
1179 | ** RSS | 1180 | ** RSS |
@@ -1207,7 +1208,6 @@ | |||
1207 | 1208 | ||
1208 | (specifications->manifest | 1209 | (specifications->manifest |
1209 | '("emacs" | 1210 | '("emacs" |
1210 | "emacs-exwm" | ||
1211 | ;;"emacs-native-comp" | 1211 | ;;"emacs-native-comp" |
1212 | <<packages>> | 1212 | <<packages>> |
1213 | )) | 1213 | )) |