From 3460c74691e5ca7a12367445d24e57c3f4692906 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 19 Dec 2023 15:24:24 -0600 Subject: [PATCH] guile --- README.org | 110 +++++++++++++++++++++++++++++++++-------------------- init.el | 84 ++++++++++++++++++++++++---------------- 2 files changed, 119 insertions(+), 75 deletions(-) diff --git a/README.org b/README.org index 89609b34..2e327b76 100644 --- a/README.org +++ b/README.org @@ -43,7 +43,6 @@ - [[#magit][Magit]] - [[#eshell][Eshell]] - [[#vterm][Vterm]] - - [[#sly-common-lisp][Sly Common Lisp]] - [[#pdf-tools][PDF-Tools]] - [[#epub][EPUB]] - [[#eaf-emacs-application-framework][EAF (Emacs Application Framework)]] @@ -979,7 +978,7 @@ Part of this config includes some special capture templates for my work as a you "~/docs/notes/nvtfc_social_media.org" "~/dev/lumina/TODO.org" "~/dev/tfcconnection/TODO.org" - "~/docs/lessons/") + "~/docs/notes/lessons/") org-id-method 'ts org-agenda-tags-column -75 org-agenda-dim-blocked-tasks nil @@ -1277,13 +1276,13 @@ We also need to setup some capture templates to use some specific setups with my ("m" "meeting" plain "%?" :file-name "%<%Y-%m-%d>-meeting-${slug}" :target (file+head "%<%Y-%m-%d>-meeting-${slug}.org" "#+TITLE: %<%Y-%m-%d> - ${slug} - ,#+AUTHOR: Chris Cochrun - ,#+CREATED: %<%D - %I:%M %p> + #+AUTHOR: Chris Cochrun + #+CREATED: %<%D - %I:%M %p> - ,* Attendees + * Attendees - - ,* Notes") + * Notes") :unnarrowed t))) (setq org-roam-node-display-template @@ -3084,6 +3083,7 @@ Let's also set =hl-line-mode= to be on for comint and prog modes (add-hook 'prog-mode-hook 'hs-minor-mode) #+END_SRC +*** Lisp Also here are some lisp specific stuff #+begin_src emacs-lisp (use-package smartparens @@ -3153,6 +3153,11 @@ Also here are some lisp specific stuff "gh" 'paredit-backward-slurp-sexp "C-l" 'paredit-forward "C-h" 'paredit-backward) + ('normal geiser-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward) ('normal cider-repl-mode-map "gl" 'paredit-forward-slurp-sexp "gh" 'paredit-backward-slurp-sexp @@ -3171,7 +3176,62 @@ Finally, here are some auto modes I'd like to setup (add-to-list 'auto-mode-alist '("\\.yuck?\\'" . lisp-data-mode)) #+end_src -*** Emacs Lisp + +**** Sly Common Lisp +Using sly makes a lot better common-lisp interaction within emacs. +#+begin_src emacs-lisp +(use-package sly + :mode + ("\\.lisp\\'" . sly-mode) + ("\\.lisp\\'" . lisp-mode) + :config + (defun chris/start-nyxt-repl () + "Start the repl and sly connection for nyxt" + (interactive) + (sly-connect "localhost" 4006)) + (setq sly-connection-poll-interval 0.1) + + (defun sly-critique-file () + "Lint this file with lisp-critic" + (interactive) + (sly-eval-async '(ql:quickload :lisp-critic)) + (sly-eval-async + `(lisp-critic:critique-file ,(buffer-file-name)))) + + :general + (chris/leader-keys + :states 'normal + :keymaps 'override + "os" 'sly + "gc" 'compile) + + (general-def 'normal lisp-mode-shared-map + "gcr" 'sly + "ge" 'sly-eval-defun + "gE" 'sly-eval-last-expression + "gp" 'sly-pprint-eval-last-expression)) +#+end_src + +**** Scheme Geiser + +#+begin_src emacs-lisp +;; (general-def 'normal scheme-mode-map + ;; "gl" 'paredit-) +#+end_src + +#+begin_src emacs-lisp +(use-package geiser + :config + :general + (general-def 'normal geiser-mode-map + "gcr" 'geiser + "ge" 'geiser-eval-definition-and-go + "gE" 'geiser-eval-last-sexp + "gp" 'geiser-eval-last-sexp-and-print + "gl" 'paredit-forward-slurp-sexp)) +#+end_src + +**** Emacs Lisp #+begin_src emacs-lisp (general-def 'normal emacs-lisp-mode-map "ge" 'eval-defun @@ -3787,7 +3847,7 @@ Ledger mode mu4e-change-filenames-when-moving t mu4e-get-mail-command "mbsync -a" mu4e-update-interval (* 15 60) - mu4e-attachment-dir "/home/chris/nc/home/Documents/attachments" + mu4e-attachment-dir "/home/chris/docs/attachments" mu4e-completing-read-function #'completing-read mu4e-notification-support t ;; mu4e-mu-binary "/home/chris/.guix-home/profile/bin/mu" @@ -4263,40 +4323,6 @@ Emulate a terminal (display-line-numbers-mode -1)) (add-hook 'vterm-mode-hook 'chris/vterm-setup) #+end_src -** Sly Common Lisp -Using sly makes a lot better common-lisp interaction within emacs. -#+begin_src emacs-lisp -(use-package sly - :mode - ("\\.lisp\\'" . sly-mode) - ("\\.lisp\\'" . lisp-mode) - :config - (defun chris/start-nyxt-repl () - "Start the repl and sly connection for nyxt" - (interactive) - (sly-connect "localhost" 4006)) - (setq sly-connection-poll-interval 0.1) - - (defun sly-critique-file () - "Lint this file with lisp-critic" - (interactive) - (sly-eval-async '(ql:quickload :lisp-critic)) - (sly-eval-async - `(lisp-critic:critique-file ,(buffer-file-name)))) - - :general - (chris/leader-keys - :states 'normal - :keymaps 'override - "os" 'sly - "gc" 'compile) - - (general-def 'normal lisp-mode-shared-map - "gcr" 'sly - "ge" 'sly-eval-defun - "gE" 'sly-eval-last-expression - "gp" 'sly-pprint-eval-last-expression)) -#+end_src ** PDF-Tools :PROPERTIES: diff --git a/init.el b/init.el index 188249c5..3b76499f 100644 --- a/init.el +++ b/init.el @@ -670,7 +670,7 @@ much faster. The hope is to also make this a faster version of imenu." "~/docs/notes/nvtfc_social_media.org" "~/dev/lumina/TODO.org" "~/dev/tfcconnection/TODO.org" - "~/docs/lessons/") + "~/docs/notes/lessons/") org-id-method 'ts org-agenda-tags-column -75 org-agenda-dim-blocked-tasks nil @@ -2404,6 +2404,11 @@ targets." "gh" 'paredit-backward-slurp-sexp "C-l" 'paredit-forward "C-h" 'paredit-backward) + ('normal geiser-mode-map + "gl" 'paredit-forward-slurp-sexp + "gh" 'paredit-backward-slurp-sexp + "C-l" 'paredit-forward + "C-h" 'paredit-backward) ('normal cider-repl-mode-map "gl" 'paredit-forward-slurp-sexp "gh" 'paredit-backward-slurp-sexp @@ -2417,6 +2422,50 @@ targets." (add-to-list 'auto-mode-alist '("\\.yuck?\\'" . lisp-data-mode)) +(use-package sly + :mode + ("\\.lisp\\'" . sly-mode) + ("\\.lisp\\'" . lisp-mode) + :config + (defun chris/start-nyxt-repl () + "Start the repl and sly connection for nyxt" + (interactive) + (sly-connect "localhost" 4006)) + (setq sly-connection-poll-interval 0.1) + + (defun sly-critique-file () + "Lint this file with lisp-critic" + (interactive) + (sly-eval-async '(ql:quickload :lisp-critic)) + (sly-eval-async + `(lisp-critic:critique-file ,(buffer-file-name)))) + + :general + (chris/leader-keys + :states 'normal + :keymaps 'override + "os" 'sly + "gc" 'compile) + + (general-def 'normal lisp-mode-shared-map + "gcr" 'sly + "ge" 'sly-eval-defun + "gE" 'sly-eval-last-expression + "gp" 'sly-pprint-eval-last-expression)) + +;; (general-def 'normal scheme-mode-map + ;; "gl" 'paredit-) + +(use-package geiser + :config + :general + (general-def 'normal geiser-mode-map + "gcr" 'geiser + "ge" 'geiser-eval-definition-and-go + "gE" 'geiser-eval-last-sexp + "gp" 'geiser-eval-last-sexp-and-print + "gl" 'paredit-forward-slurp-sexp)) + (general-def 'normal emacs-lisp-mode-map "ge" 'eval-defun "gE" 'eval-last-sexp @@ -2749,7 +2798,7 @@ targets." mu4e-change-filenames-when-moving t mu4e-get-mail-command "mbsync -a" mu4e-update-interval (* 15 60) - mu4e-attachment-dir "/home/chris/nc/home/Documents/attachments" + mu4e-attachment-dir "/home/chris/docs/attachments" mu4e-completing-read-function #'completing-read mu4e-notification-support t ;; mu4e-mu-binary "/home/chris/.guix-home/profile/bin/mu" @@ -3153,37 +3202,6 @@ targets." (display-line-numbers-mode -1)) (add-hook 'vterm-mode-hook 'chris/vterm-setup) -(use-package sly - :mode - ("\\.lisp\\'" . sly-mode) - ("\\.lisp\\'" . lisp-mode) - :config - (defun chris/start-nyxt-repl () - "Start the repl and sly connection for nyxt" - (interactive) - (sly-connect "localhost" 4006)) - (setq sly-connection-poll-interval 0.1) - - (defun sly-critique-file () - "Lint this file with lisp-critic" - (interactive) - (sly-eval-async '(ql:quickload :lisp-critic)) - (sly-eval-async - `(lisp-critic:critique-file ,(buffer-file-name)))) - - :general - (chris/leader-keys - :states 'normal - :keymaps 'override - "os" 'sly - "gc" 'compile) - - (general-def 'normal lisp-mode-shared-map - "gcr" 'sly - "ge" 'sly-eval-defun - "gE" 'sly-eval-last-expression - "gp" 'sly-pprint-eval-last-expression)) - (use-package pdf-tools :mode ("\\.pdf\\'" . pdf-view-mode) :init