From 870c70e971c1f807208142b9eec63fae52a98729 Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 29 Mar 2024 22:58:01 -0700 Subject: move to sly --- init-el.org | 176 ++++++++---------------------------------------------------- 1 file changed, 23 insertions(+), 153 deletions(-) diff --git a/init-el.org b/init-el.org index 3ac1027..5c07860 100644 --- a/init-el.org +++ b/init-el.org @@ -174,9 +174,7 @@ I'm using melpa and elpa package archives. #+begin_src elisp :results none (defvar my-major-mode-list nil "subcommands by major-mode") (setf my-major-mode-list - '(;(haxe-mode my-haxe-mode-command) - (org-mode my-org-command) - (slime-repl-mode my-lisp-mode-command) + '((org-mode my-org-command) (pdf-view-mode my-pdf-view-mod-command) (lisp-mode my-lisp-mode-command))) @@ -436,8 +434,9 @@ e.g. here's one for org capture #+name: ui-fonts #+begin_src elisp :noweb no-export (add-to-list 'default-frame-alist + '(font . "DejaVu Sans Mono-10") ;'(font . "Comic Mono-11") - '(font . "Victor Mono-10") ;; uhh + ;'(font . "Victor Mono-10") ;; uhh ) @@ -635,10 +634,8 @@ e.g. here's one for org capture (setq my-installed-themes '(poet-theme naga-theme - yoshi-theme - seoul256-theme grandshell-theme - weyland-yutani-theme + nimbus-theme morgentau-theme)) @@ -743,13 +740,17 @@ LOAD-THEME" #+begin_src elisp :noweb no-export :results none (setq *coding-themes* - '(seoul256 - yoshi + '( + ;; light + + ;; medium morgentau - weyland-yutani + nimbus + ;; dark grandshell naga)) + (setq *writing-themes* (themes-in-package 'poet)) @@ -1222,6 +1223,7 @@ math symbols. #+name: software-development-preamble #+begin_src elisp :noweb no-export :results none + (show-paren-mode 1) (which-function-mode 1) #+end_src @@ -1299,8 +1301,10 @@ code in emacs org blocks. #+name: software-dev-essentials #+begin_src elisp :noweb no-export :results none +(package-install 'company) (package-install 'magit) - +(require 'company) +(global-company-mode 1) ;; see https://github.com/magit/magit/issues/5011 (require 'seq-25) @@ -1366,95 +1370,7 @@ association one shell with each perspective layout #+begin_src elisp :results none (package-install 'paredit) -(package-install 'slime) - -#+end_src - -*** Starting SLIME with different Lisps - -#+name: common-lisp-switch-commands -#+begin_src elisp :results none - -(defvar my-current-slime-name "sbcl") -(setq sbcl-command "/home/colin/bin/sbcl --dynamic-space-size 4096") -(setq inferior-lisp-program sbcl-command) - -(defmacro start-slime-with (str name) - `(lambda () - (interactive) - (setq inferior-lisp-program ,str) - (setq my-current-slime-name ,name) - (my-switch-to-slime))) - -(defun slime-in-this-layout-p (name) - (cl-find-if (lambda (buffer) - (string-search (format "slime-repl %s" name) - (or (buffer-name buffer) ""))) - (persp-buffers (persp-curr)))) - -(defun my-switch-to-slime () - (interactive) - (let ((buff (slime-in-this-layout-p my-current-slime-name))) - (if buff (switch-to-buffer-other-window buff) - (slime)))) - -(def-my-command my-lisp-switch-command - `((?' "['] repl" my-switch-to-slime) - (?s "[s]bcl" ,(start-slime-with sbcl-command "sbcl")) - (?e "[e]cl" ,(start-slime-with "ecl" "ecl")) - (?a "[a]bcl" ,(start-slime-with "abcl" "abcl")) - ;(?c "[c]cl" ,(start-slime-with "~/lisp/ccl/lx86cl64" "ccl")) - )) - - - -#+end_src - -*** Lisp Mode Leader Key command - -Requires installation of the hyperspec and cltl packages on debain -from debian contrib - -: sudo apt install cltl hyperspec - -#+name: common-lisp-mode-command -#+begin_src elisp :results none - -(defun common-lisp-quickdocs-lookup () - (interactive) - (let ((package-name (delete ?: (format "%s" (symbol-at-point))))) - (eww (format "https://quickdocs.org/%s" package-name)))) - -(defun common-lisp-quickdocs-search (term) - (interactive "sTerm: ") - (eww (format "https://quickdocs.org/-/search?%s" - (url-build-query-string (list (list "q" term)))))) - -(def-my-command my-lisp-mode-command - '((?' "['] open slime repl" my-switch-to-slime) - (?c "[c]ompile form" slime-compile-defun) - (?l "[l]oad file" slime-load-file) - (?< "[<] list callers" slime-list-callers) - (?> "[>] list callees" slime-list-callees) - (?s "[s]ymbol describe" slime-describe-symbol) - (?S "[S]ync package" slime-sync-package-and-default-directory) - (?d "[d]ocumentation" slime-documentation) - (?\t "[TAB] inspect-presentation" slime-inspect-presentation-at-point) - (?B "Open CLTL2 [B]ook" open-cltl2) - (?q "[q]ickdocs lookup" common-lisp-quickdocs-lookup) - (?Q "[Q]uickdocs Query" common-lisp-quickdocs-search) - (?b "[b]rows system" slime-browse-system) - (?h "[h]yperspec lookup" hyperspec-lookup))) - -(defun open-cltl2 () - (interactive) - (eww "file:///usr/share/doc/cltl/clm/clm.html")) - -(with-eval-after-load 'lisp-mode - (progn - (setq common-lisp-hyperspec-root "file:///home/colin/HyperSpec/"))) - - +(package-install 'sly) #+end_src @@ -1463,8 +1379,6 @@ from debian contrib #+name: common-lisp-editing-config #+begin_src elisp :results none -(slime-setup '(slime-fancy slime-fuzzy slime-asdf)) - (autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t) (add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode) @@ -1472,8 +1386,6 @@ from debian contrib (add-hook 'lisp-mode-hook #'enable-paredit-mode) (add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode) (add-hook 'scheme-mode-hook #'enable-paredit-mode) -(add-hook 'lisp-mode-hook (lambda () - (local-set-key (kbd "") 'completion-at-point))) (defun space-for-delimiter-after-$-p (delimiter endp) (not (char-equal ?$ (char-before (point))))) @@ -1509,44 +1421,6 @@ from debian contrib #+end_src -*** SLIME-TWEAKS - -#+name: slime-tweaks -#+begin_src elisp :noweb no-export - -(defvar +symbols-in-cl+ 977) - -(defun slime-random-words-of-encouragement () - "Return a string of hackerish encouragement." - (slime-eval - `(swank:documentation-symbol - (cl:loop :for name :being :each :symbol :in (cl:find-package "CL") - :collect (cl:symbol-name name) :into names - :finally (cl:return (cl:elt names ,(random +symbols-in-cl+))))))) - -(defun slime-fasl-directory () - (let ((dir (format "%s/.cache/slime-fasls/" (getenv "HOME")))) - (make-directory dir t) - dir)) - - -(setq slime-compile-file-options - (list :fasl-directory (slime-fasl-directory))) -#+end_src - -#+RESULTS: slime-tweaks -: slime-random-words-of-encouragement - -*** LISP-MODE tweaks - - -#+name: lisp-mode-tweaks -#+begin_src elisp :noweb no-export - -#+end_src - - - *** Coalton #+name: coalton-config @@ -1601,6 +1475,9 @@ from debian contrib #+end_src +#+RESULTS: coalton-config +: insert-coalton-defpackage + #+RESULTS: coalton : insert-coalton-defpackage @@ -1612,7 +1489,7 @@ from debian contrib #+end_src #+RESULTS: haxe-config -: Package ‘haxe-mode’ installed. +: ‘haxe-mode’ is already installed ** COMMENT Python @@ -1677,6 +1554,7 @@ Saves to a temp file and puts the filename in the kill ring." #+name: loads #+begin_src elisp :noweb no-export (load "~/.emacs.d/cicadas-config.el") +(load "~/projects/cicadas.org/cicatasks.el") #+end_src * Tangle @@ -1790,19 +1668,9 @@ emacs loads at startup. <> <> <> - <> - -<> - -<> - <> - -<> - <> - <> (message "Software Dev Config Loaded") @@ -1815,4 +1683,6 @@ emacs loads at startup. <> (message "Tools and Utils Config Loaded") +(message "FINISHED LOADED") + #+end_src -- cgit v1.2.3