From 8701afbf5589d35967bc5d108df331526576bcee Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sat, 21 Oct 2023 16:51:36 -0500 Subject: [PATCH] moving evil and general behind their own sections --- README.org | 58 +++++++++++++++++++++++++++++------------------------- init.el | 46 +++++++++++++++++++++---------------------- 2 files changed, 54 insertions(+), 50 deletions(-) diff --git a/README.org b/README.org index 5e7fb42b..c5de0f61 100644 --- a/README.org +++ b/README.org @@ -473,6 +473,9 @@ Here let's try to add ligatures to our font system since the VictorMono Nerd Fon :ID: 20230626T163736.174293 :END: There are two major packages we need to get the functionality I desire. Evil and general. + +*** Evil + #+begin_src emacs-lisp (use-package evil :init @@ -500,6 +503,23 @@ This evil-collection package includes a lot of other evil based things. :config (evil-collection-init)) #+end_src +#+begin_src emacs-lisp +(use-package evil-escape + :after evil + :init (evil-escape-mode +1) + :config + (setq evil-escape-key-sequence (kbd "fd") + evil-escape-delay 0.3)) +#+end_src + +#+begin_src emacs-lisp +(use-package evil-surround + :after evil + :config + (global-evil-surround-mode +1)) +#+end_src + +*** General #+begin_src emacs-lisp (use-package general :init @@ -615,22 +635,6 @@ This evil-collection package includes a lot of other evil based things. "C-" 'indent-for-tab-command)) #+end_src -#+begin_src emacs-lisp -(use-package evil-escape - :after evil - :init (evil-escape-mode +1) - :config - (setq evil-escape-key-sequence (kbd "fd") - evil-escape-delay 0.3)) -#+end_src - -#+begin_src emacs-lisp -(use-package evil-surround - :after evil - :config - (global-evil-surround-mode +1)) -#+end_src - ** Org Mode Org-Mode needs to be loaded pretty high in the file so that we are ensuring things get picked up in the correct order. This has been a problem for me in the past so I prefer it right after setting some keybindings and then much later loading things like =roam= =super-agenda= and others. @@ -2964,14 +2968,14 @@ I'd like to start learning and using rust if I can. :general (general-def 'normal rustic-mode-map "!" 'rustic-run-shell-command - "gC" 'rustic-cargo-check "gC" 'rustic-cargo-clippy "gA" 'rustic-cargo-add "gt" 'rustic-cargo-test) (chris/leader-keys :states 'normal - :keymaps 'override - "gc" 'rustic-compile)) + :keymaps 'rustic-mode + "gc" 'rustic-compile + "gr" 'rustic-cargo-run-rerun)) #+end_src #+begin_src emacs-lisp @@ -3476,7 +3480,7 @@ Ledger mode :END: #+begin_src emacs-lisp (use-package mu4e - ;; :load-path "~/.guix-home/profile/share/emacs/site-lisp/mu4e/" + :load-path "~/.guix-home/profile/share/emacs/site-lisp/mu4e/" :init (setq mu4e-maildir "~/mail" @@ -3899,8 +3903,8 @@ Let's add our own eshell prompt. and set the password cache to a significantly h ("ksb" "/home/chris/dev/kde/src/kdesrc-build/kdesrc-build") ("ws" "rsync -avzP public/ chris@staff.tfcconnection.org:tfcconnection") ("wttr" "curl wttr.in/@home.cochrun.xyz") - ("gh" "guix home -L ~/dotfiles/guix reconfigure /home/chris/dotfiles/guix/home.scm") - ("gs" ,(concat "sudo guix system -L ~/dotfiles/guix reconfigure /home/chris/dotfiles/guix/" (system-name) ".scm")))) + ("gh" "guix home -L ~/.dotfiles/guix reconfigure /home/chris/.dotfiles/guix/home.scm") + ("gs" ,(concat "sudo guix system -L ~/.dotfiles/guix reconfigure /home/chris/.dotfiles/guix/" (system-name) ".scm")))) (defun chris/eshell-new() "Open a new eshell buffer" @@ -3925,8 +3929,6 @@ Let's add our own eshell prompt. and set the password cache to a significantly h (other-window 1) (delete-window))) - (add-hook 'eshell-load-hook #'eat-eshell-mode) - :general (chris/leader-keys :states 'normal @@ -3976,8 +3978,9 @@ Using sly makes a lot better common-lisp interaction within emacs. :general (chris/leader-keys :states 'normal - :keymaps 'lisp-mode-shared-map - "os" 'sly) + :keymaps 'override + "os" 'sly + "gc" 'compile) (general-def 'normal lisp-mode-shared-map "gcr" 'sly)) @@ -4051,7 +4054,8 @@ With empv we can perhaps control mpv much more fine grainly and even search yout :config (setq empv-invidious-instance "https://vid.puffyan.us/api/v1" empv-video-file-extensions '("mkv" "mp4" "avi" "mov" "webm") - empv-mpv-args '("--no-terminal" "--idle" "--input-ipc-server=/tmp/empv-socket")) + empv-mpv-args '("--no-terminal" "--idle" "--input-ipc-server=/tmp/empv-socket") + empv-video-dir "~/vids") (empv-embark-initialize-extra-actions) (general-auto-unbind-keys) (add-hook 'empv-resultes-mode-hook #'evil-normal-state) diff --git a/init.el b/init.el index 1641de04..9544cb8a 100644 --- a/init.el +++ b/init.el @@ -231,6 +231,18 @@ :after evil :config (evil-collection-init)) +(use-package evil-escape + :after evil + :init (evil-escape-mode +1) + :config + (setq evil-escape-key-sequence (kbd "fd") + evil-escape-delay 0.3)) + +(use-package evil-surround + :after evil + :config + (global-evil-surround-mode +1)) + (use-package general :init (general-evil-setup) @@ -344,18 +356,6 @@ "TAB" 'indent-according-to-mode "C-" 'indent-for-tab-command)) -(use-package evil-escape - :after evil - :init (evil-escape-mode +1) - :config - (setq evil-escape-key-sequence (kbd "fd") - evil-escape-delay 0.3)) - -(use-package evil-surround - :after evil - :config - (global-evil-surround-mode +1)) - (setq lpr-command "lpr -o sides=two-sided-long-edge -# ") (defun chris/org-mode-setup () (interactive) @@ -2224,14 +2224,14 @@ targets." :general (general-def 'normal rustic-mode-map "!" 'rustic-run-shell-command - "gC" 'rustic-cargo-check "gC" 'rustic-cargo-clippy "gA" 'rustic-cargo-add "gt" 'rustic-cargo-test) (chris/leader-keys :states 'normal - :keymaps 'override - "gc" 'rustic-compile)) + :keymaps 'rustic-mode + "gc" 'rustic-compile + "gr" 'rustic-cargo-run-rerun)) (use-package slint-mode :mode "\\.slint\\'") @@ -2477,7 +2477,7 @@ targets." (use-package ledger-mode) (use-package mu4e - ;; :load-path "~/.guix-home/profile/share/emacs/site-lisp/mu4e/" + :load-path "~/.guix-home/profile/share/emacs/site-lisp/mu4e/" :init (setq mu4e-maildir "~/mail" @@ -2842,8 +2842,8 @@ targets." ("ksb" "/home/chris/dev/kde/src/kdesrc-build/kdesrc-build") ("ws" "rsync -avzP public/ chris@staff.tfcconnection.org:tfcconnection") ("wttr" "curl wttr.in/@home.cochrun.xyz") - ("gh" "guix home -L ~/dotfiles/guix reconfigure /home/chris/dotfiles/guix/home.scm") - ("gs" ,(concat "sudo guix system -L ~/dotfiles/guix reconfigure /home/chris/dotfiles/guix/" (system-name) ".scm")))) + ("gh" "guix home -L ~/.dotfiles/guix reconfigure /home/chris/.dotfiles/guix/home.scm") + ("gs" ,(concat "sudo guix system -L ~/.dotfiles/guix reconfigure /home/chris/.dotfiles/guix/" (system-name) ".scm")))) (defun chris/eshell-new() "Open a new eshell buffer" @@ -2868,8 +2868,6 @@ targets." (other-window 1) (delete-window))) - (add-hook 'eshell-load-hook #'eat-eshell-mode) - :general (chris/leader-keys :states 'normal @@ -2901,8 +2899,9 @@ targets." :general (chris/leader-keys :states 'normal - :keymaps 'lisp-mode-shared-map - "os" 'sly) + :keymaps 'override + "os" 'sly + "gc" 'compile) (general-def 'normal lisp-mode-shared-map "gcr" 'sly)) @@ -2949,7 +2948,8 @@ targets." :config (setq empv-invidious-instance "https://vid.puffyan.us/api/v1" empv-video-file-extensions '("mkv" "mp4" "avi" "mov" "webm") - empv-mpv-args '("--no-terminal" "--idle" "--input-ipc-server=/tmp/empv-socket")) + empv-mpv-args '("--no-terminal" "--idle" "--input-ipc-server=/tmp/empv-socket") + empv-video-dir "~/vids") (empv-embark-initialize-extra-actions) (general-auto-unbind-keys) (add-hook 'empv-resultes-mode-hook #'evil-normal-state)