From 15a85dd0979f2552df2d4b1469005e8a97fccfcf Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 22 Jun 2024 08:52:54 -0700 Subject: Brining back the classics --- init-el.org | 68 +++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/init-el.org b/init-el.org index 5a604c0..e197610 100644 --- a/init-el.org +++ b/init-el.org @@ -46,7 +46,12 @@ (defun middle-of-list (xs) (elt xs (/ (length xs) 2))) +(defvar my-emacs-config-location "~/projects/init-el-org/init-el.org" + "The location of the org file that generates my emacs config") +(defun open-emacs-config () + (interactive) + (find-file my-emacs-config-location)) #+end_src ** Native Compilation @@ -149,7 +154,7 @@ I'm using melpa and elpa package archives. (def-my-command my-leader-command '((?/ "[/] swiper" swiper) ;(?? "[?] imenu" imenu-list) - (?? "[?] replace" query-replace) + (?r "[r] replace" query-replace) (?e "[e]diting" my-special-edit-command) (?' "['] shell" persp-shell--jump-to-persp-shell) (?b "[b]uffers" my-buffer-command) @@ -164,7 +169,7 @@ I'm using melpa and elpa package archives. (?f "[f]ind-file" find-file) (?d "[d]ired" dired) ;(?d "[d]irvish" dirvish) - (?r "[r]eading" my-reading-command) + (?r "[R]eading" my-reading-command) (?s "[s]ly" sly) (?h "[h]elp" helpful-at-point))) @@ -207,6 +212,7 @@ I'm using melpa and elpa package archives. (?a "[a]genda" org-agenda) (?b "[b]ooks" calibredb) (?d "[d]eft" toggle-deft) + (?e "[e]macs config" open-emacs-config) (?f "el[f]eed" elfeed) (?j "[j]ournal" toggle-journal) (?s "[s]ecrets" toggle-secrets) @@ -502,7 +508,7 @@ again, if it was whent he org edit src buffer was opened." (?f "[f]it window" my-fit-window-to-buffer) (?p "font [p]itch shift" variable-pitch-mode) (?v "[v]isual line mode" visual-line-mode) - (?w "[w]riting mode" olivetti-mode))) + (?w "[w]riting mode" writeroom-mode))) #+end_src *** Buffer Leader Key Menu @@ -545,6 +551,7 @@ again, if it was whent he org edit src buffer was opened." (feline-mode-symbols '(emacs-lisp-mode "eλ" lisp-interaction-mode "eλ" + haxe-mode "🪓" shell-mode "🖳" lisp-mode "λ" org-mode "🌳" @@ -658,6 +665,7 @@ LOAD-THEME" poet-theme silkworm-theme flexoki-themes + dracula-theme naga-theme grandshell-theme faff-theme @@ -683,14 +691,13 @@ LOAD-THEME" ;; light leuven flexoki-themes-light - silkworm faff ;; medium base16-catppuccin-frappe base16-silk-dark + dracula ;; dark base16-chalk - flexoki-themes-dark grandshell naga)) @@ -800,7 +807,7 @@ stand up and move around. :empty-lines 1 :prepend t) ("n" "Note" entry - (file+olp "~/notes/deft/project-Planner.org" "Notes") + (file+olp "~/notes/deft/Planner.org" "Notes") "* %U\n\n %F\n\n" :prepend t :empty-lines 1) @@ -808,7 +815,7 @@ stand up and move around. (file+olp+datetree "~/notes/circadian.org.cpt") "") ("c" "Calendar" entry - (file+headline "~/notes/deft/project-Planner.org" "CALENDAR") + (file+headline "~/notes/deft/Planner.org" "CALENDAR") "* %?\n %(cfw:org-capture-day)")))) #+end_src @@ -1020,11 +1027,23 @@ imenu-list displayes imenu results in a a navigable table-of-contents tree-like #+end_src -** Olivetti -#+name: olivetti -#+begin_src elisp :results none -(package-install 'olivetti) +** Writeroom + +#+name: writeroom +#+begin_src elisp :noweb no-export +(package-install 'writeroom-mode) + +(defun enable-visual-line-mode () + (visual-line-mode 1)) + +(defun disable-visual-line-mode () + (visual-line-mode 0)) + +(add-hook 'writeroom-mode-enable-hook 'enable-visual-line-mode) +(add-hook 'writeroom-mode-disable-hook 'disable-visual-line-mode) + + #+end_src @@ -1149,10 +1168,9 @@ code in emacs org blocks. (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) - (python . t) (lisp . t) - (C . t) (shell . t) + (dot . t) ;(jupyter . t) )) @@ -1281,16 +1299,12 @@ association one shell with each perspective layout (?S "[S]ync package" sly-mrepl-sync) (?\t "TAB inpsect" sly-inspect))) +(setq sly-lisp-implementations + '((sbcl ("/home/colin/bin/sbcl")) + (clasp ("/usr/local/bin/iclasp")) + (clisp ("/usr/bin/clisp")) + (ecl ("/usr/bin/ecl")))) -;; (defvar +symbols-in-cl+ 977) - -;; (defun sky-random-words-of-encouragement () -;; "Return a string of hackerish encouragement." -;; (sly-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")))) @@ -1300,8 +1314,6 @@ association one shell with each perspective layout (setq sly-compile-file-options (list :fasl-directory (slime-fasl-directory))) -;; (setq slime-compile-file-options -;; (list :fasl-directory (slime-fasl-directory))) #+end_src @@ -1356,6 +1368,13 @@ association one shell with each perspective layout (setq lisp-lambda-list-keyword-parameter-alignment t lisp-lambda-list-keyword-alignment t) (put 'make-instance 'common-lisp-indent-function 1) +(put 'format 'common-lisp-indent-function 2) + +;; customizations for `def` and other common tools I use +(put 'fast 'common-lisp-indent-function 3) +(put 'const 'common-lisp-indent-function 2) +(put 'var 'common-lisp-indent-function 1) + #+end_src *** Coalton @@ -1439,6 +1458,7 @@ libraries should be available (package-install 'battle-haxe) (add-hook 'haxe-mode-hook #'battle-haxe-mode) +(add-hook 'haxe-mode-hook #'linum-mode) (custom-set-variables '(battle-haxe-immediate-completion t)) -- cgit v1.2.3