From fc260cba25f032bd10687f5dd566766bd8160bce Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Tue, 4 Oct 2022 18:43:56 +0200 Subject: Update Emacs configuration files. --- .config/emacs/init.el | 90 ++++++++++++++++++--------------------------------- 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 @@ (setq user-emacs-directory "~/.cache/emacs") (require 'package) -(setq package-archives '(("melpa" . "https://melpa.org/packages/") - ("org" . "https://orgmode.org/elpa/") - ("gnu-devel" . "https://elpa.gnu.org/devel/") - ("elpa" . "https://elpa.gnu.org/packages/"))) -(package-initialize) + (setq package-archives '(("melpa" . "https://melpa.org/packages/") + ("org" . "https://orgmode.org/elpa/") + ("gnu-devel" . "https://elpa.gnu.org/devel/") + ("elpa" . "https://elpa.gnu.org/packages/"))) + (package-initialize) -(unless package-archive-contents - (package-refresh-contents)) + (unless package-archive-contents + (package-refresh-contents)) -(unless (package-installed-p 'use-package) - (package-install 'use-package)) + (unless (package-installed-p 'use-package) + (package-install 'use-package)) -(setq use-package-always-ensure t) +;; (setq use-package-always-ensure t) -(require 'use-package) + (add-to-list 'load-path ".config/emacs/jd/") -(push ".config/emacs/jd/" load-path) + (require 'use-package) (use-package general :config @@ -79,13 +79,6 @@ :config (evil-collection-init)) -(defhydra hydra-resize-window (:timeout 4) - ("h" evil-window-decrease-width "<") - ("l" evil-window-increase-width ">") - ("k" evil-window-decrease-height "^") - ("j" evil-window-increase-height "v") - ("q" nil "finished" :exit t)) - (jd/leader-key-def "w" 'evil-window-map "wr" '(hydra-resize-window/body :which-key "Rezize window") @@ -185,6 +178,13 @@ (let ((old-face-attribute (face-attribute 'default :height))) (set-face-attribute 'default nil :height (- old-face-attribute 10)))) +(defhydra hydra-resize-window (:timeout 4) + ("h" evil-window-decrease-width "<") + ("l" evil-window-increase-width ">") + ("k" evil-window-decrease-height "^") + ("j" evil-window-increase-height "v") + ("q" nil "finished" :exit t)) + (defhydra hydra-text-scale-global (:timeout 4) "scale text" ("j" jd/text-scale-increase "in") @@ -303,7 +303,7 @@ (set-face-attribute (car face) nil :font "Monospace" :weight 'Bold :height (cdr face))) ;; Ensure that anything that should be fixed-pitch in Org files appears that way - (set-face-attribute 'org-block nil :font "mononoki Nerd Font" :inherit 'fixed-pitch) + ;; (set-face-attribute 'org-block nil :font "mononoki Nerd Font" :inherit 'fixed-pitch) (set-face-attribute 'org-table nil :inherit 'fixed-pitch) (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) @@ -405,26 +405,19 @@ :after lsp) (defun jd/python-mode-setup () - (let ((project-venv-path (concat (projectile-project-root) "venv/"))) - (when (projectile--directory-p project-venv-path) - (pyvenv-activate project-venv-path) - (pyvenv-mode)))) - -(use-package python-mode - :hook (python-mode . lsp-deferred) - :hook (python-mode . jd/python-mode-setup) - :config - (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))) + (let ((project-venv-path (concat (projectile-project-root) "venv/"))) + (when (projectile--directory-p project-venv-path) + (pyvenv-activate project-venv-path) + (pyvenv-mode)))) -(use-package pyvenv - :after python-mode) +;; (use-package python-mode ;;TODO: find alternative +;; :hook (python-mode . lsp-deferred) +;; :hook (python-mode . jd/python-mode-setup) +;; :config +;; (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))) -(use-package django-mode - :config - ;; Remove all django-mode objects from auto-mode-alist - (while (rassq 'django-mode auto-mode-alist) - (let ((django-mode-object (rassq 'django-mode auto-mode-alist))) - (setq auto-mode-alist (delete django-mode-object auto-mode-alist))))) + (use-package pyvenv + :after python-mode) (use-package typescript-mode :mode ("\\.ts\\'") @@ -438,15 +431,12 @@ (tide-hl-identifier-mode))) (use-package tide - :ensure t :after (typescript-mode company web-mode)) (use-package flycheck - :ensure t :hook ((after-init . global-flycheck-mode))) (use-package web-mode - :ensure t :hook ((web-mode . jd/activate-tide-mode)) :mode ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") @@ -471,24 +461,6 @@ "dc" '(docker-containers :which-key "Docker containers") "dd" '(docker :which-key "Docker")) -(use-package dap-mode - ;; Uncomment the config below if you want all UI panes to be hidden by default! - ;; :custom - ;; (lsp-enable-dap-auto-configure nil) - ;; :config - ;; (dap-ui-mode 1) - :commands dap-debug - :config - ;; Set up Node debugging - (require 'dap-node) - (dap-node-setup) ;; Automatically installs Node debug adapter if needed - - ;; Bind `C-c l d` to `dap-hydra` for easy access - (general-define-key - :keymaps 'lsp-mode-map - :prefix lsp-keymap-prefix - "d" '(dap-hydra t :wk "debugger"))) - (use-package company :after lsp-mode :hook (lsp-mode . company-mode) diff --git a/Emacs.org b/Emacs.org index 3862155..cf60477 100644 --- a/Emacs.org +++ b/Emacs.org @@ -1,4 +1,3 @@ - #+author: jdlugosz963 #+PROPERTY: header-args:emacs-lisp :tangle .config/emacs/init.el @@ -8,7 +7,7 @@ - [[#user-information-setup][User information setup]] - [[#stay-clean][Stay clean]] - [[#package-setup][Package setup]] -- [[#keboard-setup][Keboard Setup]] +- [[#keyboard-setup][Keyboard Setup]] - [[#general-setup][General Setup]] - [[#evil-mode-setup][Evil mode setup]] - [[#ui-configuration][UI Configuration]] @@ -73,7 +72,6 @@ (add-hook 'emacs-startup-hook #'jd/startup) #+end_src - * User information setup #+begin_src emacs-lisp @@ -123,7 +121,7 @@ #+end_src -* Keboard Setup +* Keyboard Setup ** General Setup #+begin_src emacs-lisp @@ -469,7 +467,6 @@ #+end_src * Org - ** Org-mode setup #+begin_src emacs-lisp @@ -810,7 +807,6 @@ #+end_src - *** TypeScript #+begin_src emacs-lisp @@ -827,15 +823,12 @@ (tide-hl-identifier-mode))) (use-package tide - :ensure t :after (typescript-mode company web-mode)) (use-package flycheck - :ensure t :hook ((after-init . global-flycheck-mode))) (use-package web-mode - :ensure t :hook ((web-mode . jd/activate-tide-mode)) :mode ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") @@ -1173,7 +1166,15 @@ - Load my [[./Mu4e.org][mu4e]] config #+begin_src emacs-lisp -; (require 'jd-mu4e) + (require 'jd-mu4e) +#+end_src + +*Guix Packages* + +#+begin_src scheme :noweb-ref packages :noweb-sep "" + + "mu" + #+end_src ** RSS @@ -1207,7 +1208,6 @@ (specifications->manifest '("emacs" - "emacs-exwm" ;;"emacs-native-comp" <> )) -- cgit v1.2.3