From 7f7ec1ad23513835d64fa7f3a44c4106a4e4fdc9 Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Sun, 1 Jan 2023 04:02:06 +0100 Subject: Add better lisp experience support for Emacs --- Emacs.org | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) (limited to 'Emacs.org') diff --git a/Emacs.org b/Emacs.org index f2a3c34..3fabb47 100644 --- a/Emacs.org +++ b/Emacs.org @@ -370,13 +370,14 @@ #+begin_src emacs-lisp - (jd/leader-key-def - "e" '(:ignore t :which-key "Eval") - "eb" '(eval-buffer :which-key "Eval buffer")) + (jd/leader-key-def + "e" '(:ignore t :which-key "Eval") + "eb" '(eval-buffer :which-key "Eval buffer") + "ee" '(eval-defun :which-key "Eval defun")) - (jd/leader-key-def - :keymaps '(visual) - "er" '(eval-region :which-key "Eval region")) + (jd/leader-key-def + :keymaps '(visual) + "er" '(eval-region :which-key "Eval region")) #+end_src @@ -657,6 +658,36 @@ #+end_src +*** Lisp + +#+begin_src emacs-lisp + + (use-package paredit) + (use-package evil-paredit) + (use-package rainbow-delimiters) + + (defun jd/lisp-mode-setup () + (rainbow-delimiters-mode) + (evil-paredit-mode) + (paredit-mode)) + + (add-hook 'emacs-startup-hook + (lambda () + (add-hook 'scheme-mode-hook 'jd/lisp-mode-setup) + (add-hook 'emacs-lisp-mode-hook 'jd/lisp-mode-setup) + (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup))) + + (evil-define-key 'normal paredit-mode-map (kbd "g h") 'paredit-forward-barf-sexp) + (evil-define-key 'normal paredit-mode-map (kbd "g l") 'paredit-forward-slurp-sexp) + + (evil-define-key 'normal paredit-mode-map (kbd "g H") 'paredit-backward-slurp-sexp) + (evil-define-key 'normal paredit-mode-map (kbd "g L") 'paredit-backward-barf-sexp) + + (use-package geiser) + (use-package geiser-guile) + +#+end_src + *** Python #+begin_src emacs-lisp -- cgit v1.2.3