diff options
author | Grant Shangreaux <shoshin@cicadas.surf> | 2023-01-30 13:50:34 -0600 |
---|---|---|
committer | Grant Shangreaux <shoshin@cicadas.surf> | 2023-01-30 13:50:34 -0600 |
commit | 4837c4787dd98cb152589c8887624e5a142ceb54 (patch) | |
tree | 206060dabc887a3af5893d37c021a25d44db3d44 | |
parent | 70a6011e0e0848e95b97bc817579f056108b95fb (diff) |
Add: more robust [slime][common-lisp] configuration
-rw-r--r-- | shoshimacs.el | 43 | ||||
-rw-r--r-- | shoshimacs.org | 65 |
2 files changed, 100 insertions, 8 deletions
diff --git a/shoshimacs.el b/shoshimacs.el index 14a0d40..592935e 100644 --- a/shoshimacs.el +++ b/shoshimacs.el @@ -178,8 +178,10 @@ (package-install 'crdt) ;;; Programming +(setq inferior-lisp-program "sbcl") + (defvar slime-repo "https://github.com/slime/slime") -(defvar slime-src-dir "~/src/slime") +(defvar slime-src-dir (expand-file-name "~/src/slime/")) (unless (file-directory-p slime-src-dir) (shell-command @@ -187,9 +189,28 @@ (add-to-list 'load-path slime-src-dir) -(require 'slime) - -(setq inferior-lisp-program "sbcl") +(let ((default-directory (concat slime-src-dir "doc/")) + (buf (get-buffer-create "*slime-make-info*"))) + (unless (file-exists-p "slime.info") + (shell-command "make clean" "*slime-make-info*") + (shell-command "make slime.info" "*slime-make-info*"))) + +(defvar slime-contribs + '( + slime-fancy ;; default value, includes many fundamental contribs + slime-mrepl + inferior-slime + slime-fuzzy + slime-asdf + slime-banner + slime-presentations + slime-xref-browser + slime-highlight-edits + slime-quicklisp + ) + "Additional SLIME packages to load on start.") + +(require 'slime-autoloads) (package-install 'json-mode) @@ -306,6 +327,20 @@ (package-install 'autothemer) +(setq telephone-line-lhs + '((evil . (telephone-line-evil-tag-segment)) + (accent . (telephone-line-vc-segment + telephone-line-erc-modified-channels-segment + telephone-line-process-segment)) + (nil . (telephone-line-minor-mode-segment + telephone-line-buffer-segment)))) +(setq telephone-line-rhs + '((nil . (telephone-line-misc-info-segment)) + (accent . (telephone-line-major-mode-segment)) + (evil . (telephone-line-airline-position-segment)))) + +(telephone-line-mode t) + (defun screenshot-svg () "Save a screenshot of the current frame as an SVG image. Saves to a temp file and puts the filename in the kill ring." diff --git a/shoshimacs.org b/shoshimacs.org index c9ba316..1e92738 100644 --- a/shoshimacs.org +++ b/shoshimacs.org @@ -1,4 +1,4 @@ -#+AUTHOR: Grant Shoshin Shangreaux +#+AUTHOR Shoshin Shangreaux #+EMAIL: shoshin@cicadas.surf #+DESCRIPTION: Html version of an Emacs literate org configuration #+STARTUP: overview @@ -694,22 +694,59 @@ from them in various Emacs menus. [[*\[\[info:consult#Top\]\[consult\]\] - Consu ** Languages *** Common Lisp +I primarily use SBCL, so I set it as the ~inferior-lisp-program~ + +#+begin_src emacs-lisp + (setq inferior-lisp-program "sbcl") +#+end_src + +**** Slime The ~slime~ package v2.26.1 in the nongnu repo seems to have an issue with emacs 28.1 (?) so I'm installing it from source. +#+name: install-slime #+begin_src emacs-lisp (defvar slime-repo "https://github.com/slime/slime") - (defvar slime-src-dir "~/src/slime") + (defvar slime-src-dir (expand-file-name "~/src/slime/")) (unless (file-directory-p slime-src-dir) (shell-command (format "git clone %s %s" slime-repo slime-src-dir))) (add-to-list 'load-path slime-src-dir) +#+end_src + +There is a command ~slime-info~ to read the locally built manual file, +but i need to ensure it is built: + +#+begin_src emacs-lisp + (let ((default-directory (concat slime-src-dir "doc/")) + (buf (get-buffer-create "*slime-make-info*"))) + (unless (file-exists-p "slime.info") + (shell-command "make clean" "*slime-make-info*") + (shell-command "make slime.info" "*slime-make-info*"))) +#+end_src - (require 'slime) +_SLIME CONTRIBS_ - (setq inferior-lisp-program "sbcl") +#+name: slime-contribs +#+begin_src emacs-lisp + (defvar slime-contribs + '( + slime-fancy ;; default value, includes many fundamental contribs + slime-mrepl + inferior-slime + slime-fuzzy + slime-asdf + slime-banner + slime-presentations + slime-xref-browser + slime-highlight-edits + slime-quicklisp + ) + "Additional SLIME packages to load on start.") + + (require 'slime-autoloads) #+end_src *** Javascript @@ -1079,6 +1116,26 @@ for theme development. (package-install 'autothemer) #+end_src +** modeline +*** telephone line + +#+begin_src emacs-lisp +(setq telephone-line-lhs + '((evil . (telephone-line-evil-tag-segment)) + (accent . (telephone-line-vc-segment + telephone-line-erc-modified-channels-segment + telephone-line-process-segment)) + (nil . (telephone-line-minor-mode-segment + telephone-line-buffer-segment)))) +(setq telephone-line-rhs + '((nil . (telephone-line-misc-info-segment)) + (accent . (telephone-line-major-mode-segment)) + (evil . (telephone-line-airline-position-segment)))) + +(telephone-line-mode t) +#+end_src + + ** SVG Screenshot #+begin_src emacs-lisp |