diff options
author | colin <colin@cicadas.surf> | 2025-01-13 20:05:24 -0800 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2025-01-13 20:05:24 -0800 |
commit | 738c8307c671f2b6038780f58d6fec32c0baae75 (patch) | |
tree | 06d696905c54b507113fa1054509360f7bfb9bd8 | |
parent | 8eeea3da111c9e0dd95a7bcf1221636d98930234 (diff) |
nicerite mode
-rw-r--r-- | init-el.org | 187 |
1 files changed, 119 insertions, 68 deletions
diff --git a/init-el.org b/init-el.org index 13d0080..323d134 100644 --- a/init-el.org +++ b/init-el.org @@ -172,7 +172,7 @@ I'm using melpa and elpa package archives. (?f "[f]ind-file" find-file) (?d "[d]enote" my-denote-commands) (?r "[R]eading" my-reading-command) - (?s "[s]ly" sly) + (?s "[s]ly" my-sly-invocation-command) (?h "[h]elp" helpful-at-point))) @@ -451,15 +451,13 @@ again, if it was whent he org edit src buffer was opened." (message ";;; COMMAND COMPLETIONS ") (package-install 'ivy) -;(package-install 'smex) (package-install 'amx) (package-install 'swiper) (ivy-mode 1) (setq ivy-use-selectable-prompt t) (amx-mode) -;(smex-initialize) -;(global-set-key (kbd "M-x") 'smex) + #+end_src @@ -537,7 +535,8 @@ again, if it was whent he org edit src buffer was opened." '((?b "switch [b]uffers" ivy-switch-buffer) (?s "[s]ave buffer" save-buffer) (?S "[S]ave all buffers" save-some-buffers) - (?k "[k]ill buffer" kill-buffer))) + (?k "[k]ill buffer" kill-buffer) + (?i "[i]buffer" ibuffer))) #+end_src @@ -677,32 +676,23 @@ LOAD-THEME" (message ";;; INSTALLED THEMES") - - (package-install 'autothemer) ;; for custom themes (setq my-installed-themes '( plan9-theme - solarized-theme + distinguished-theme + starlit-theme poet-theme - subatomic-theme - weyland-yutani-theme - grey-paper-theme - yabaki-theme + yoshi-theme kaolin-themes - tao-theme - rimero-theme - seoul256-theme - dakrone-theme morgentau-theme naga-theme grandshell-theme - faff-theme - doom-themes - base16-theme - almost-mono-themes - ef-themes + challenger-deep-theme + ancient-one-dark-theme + badger-theme + pastelmac-theme )) (dolist (package my-installed-themes) @@ -722,41 +712,39 @@ LOAD-THEME" (message ";;; CHOICE THEMES") -(setq *coding-themes* +(defvar *coding-themes* nil + "This is a modal theme set, toggles between writing and coding +themes. I set this variable to whichever theme set I feel like +coding in.") + +(defvar *writing-themes* nil + "This is a modal theme set variable, toggles between writing and +coding themese. I set whichever themeset I feel like writing in.") + +(setq *singular-themes* '( ;; light leuven plan9 - goose - faff ;; medium - solarized-selenized-dark - morgentau - solarized-gruvbox-dark + seoul256 + yoshi + leuven-dark ;; dark - weyland-yutani - doom-dark+ grandshell naga)) +(setq *kaolin-themes* + (themes-in-package 'kaolin)) -;; (setq *coding-themes* -;; (themes-in-package 'ef)) -;; (setq *coding-themes* -;; (themes-in-package 'tao)) +(setf *coding-themes* *singular-themes*) -;; (setq *coding-themes* -;; (themes-in-package 'kaolin)) +(setq *writing-themes* (themes-in-package 'poet)) -;; (setq *coding-themes* -;; (themes-in-package 'doom)) -(setq *writing-themes* - (themes-in-package 'poet)) - -(setq *current-theme-set* *coding-themes*) +(setq *current-theme-set* *singular-themes*) (when (car custom-enabled-themes) (disable-theme (car custom-enabled-themes))) @@ -1134,6 +1122,27 @@ imenu-list displayes imenu results in a a navigable table-of-contents tree-like #+end_src +** Niceright Mode + +Niceright mode isn't a mode at all. It is just setting a margin and +setting visual line mode on all org files to make writing org a little +nicer. + +#+name: nicerite-mode +#+begin_src elisp :noweb no-export + +(defun nicerite-mode () + (setq left-margin-width 6) + (setq right-margin-width 6) + (visual-line-mode)) + + +(add-hook 'org-mode-hook 'nicerite-mode) + + + +#+end_src + ** Writeroom #+name: writeroom @@ -1150,9 +1159,6 @@ imenu-list displayes imenu results in a a navigable table-of-contents tree-like (add-hook 'writeroom-mode-enable-hook 'enable-visual-line-mode) (add-hook 'writeroom-mode-disable-hook 'disable-visual-line-mode) - - - #+end_src ** EWW config @@ -1338,6 +1344,11 @@ code in emacs org blocks. ;; see https://github.com/magit/magit/issues/5011 ;;(require 'seq-25) +;; exec-path from shell sets PATH from .bashrc +(package-install 'exec-path-from-shell) +(when (memq window-system '(mac ns x)) + (exec-path-from-shell-initialize)) + (package-install 'ag) @@ -1413,6 +1424,19 @@ association one shell with each perspective layout #+name: sly-config #+begin_src elisp :noweb no-export + +(defun my-sly-invocation-command () + (interactive) + (if (sly-connected-p) + (switch-to-buffer (sly-mrepl)) + (let ((current-prefix-arg '-)) + (call-interactively 'sly)))) + +(let ((local-bin + (concat (getenv "HOME") "/.local/bin"))) + (unless (cl-search local-bin (getenv "PATH")) + (setenv "PATH" (concat local-bin ";" (getenv "PATH"))))) + (def-my-command my-lisp-mode-command '((?d "[d]ocumentation" sly-describe-symbol) (?h "[h]yperspec" hyperspec-lookup) @@ -1420,10 +1444,8 @@ association one shell with each perspective layout (?\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")))) + '((sbcl ("sbcl" "--dynamic-space-size" "8192") :coding-system utf-8-unix) + (qlot ("qlot" "exec" "sbcl") :coding-system utf-8-unix))) (defun slime-fasl-directory () @@ -1442,6 +1464,9 @@ association one shell with each perspective layout #+name: common-lisp-editing-config #+begin_src elisp :results none +(require 're-builder) +(setq reb-re-syntax 'rx) + (autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t) (add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode) @@ -1459,6 +1484,7 @@ association one shell with each perspective layout (defun space-for-delimiter-after-p-p (delimiter endp) (not (char-equal ?P (char-before (point))))) +(add-hook 'lisp-mode-hook 'display-line-numbers-mode) (setq paredit-space-for-delimiter-predicates (list 'space-for-delimiter-after-$-p @@ -1486,6 +1512,7 @@ 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 'make-array 'common-lisp-indent-function 1) (put 'format 'common-lisp-indent-function 2) ;; customizations for `def` and other common tools I use @@ -1493,6 +1520,15 @@ association one shell with each perspective layout (put 'const 'common-lisp-indent-function 2) (put 'var 'common-lisp-indent-function 1) +(defvar lisp-mode-personal-keywords-regex + (rx (seq "def:" (or "class" "typed" "var" "const") space))) + +(defun lisp-mode-personal-keywords () + (font-lock-add-keywords + 'lisp-mode + `((,lisp-mode-personal-keywords-regex . font-lock-keyword-face)))) + +(add-hook 'lisp-mode-hook #'lisp-mode-personal-keywords) #+end_src *** Coalton @@ -1559,13 +1595,25 @@ association one shell with each perspective layout #+name: wasm-dev #+begin_src elisp :noweb no-export -;; "WASM" +"WASM" -;; (add-to-list 'load-path (concat (getenv "HOME") "/.emacs.d/manual-packages/wat-mode/")) -;; (require 'wat-mode) +(add-to-list 'load-path (concat (getenv "HOME") "/projects/wat-mode/")) +(require 'wat-mode) #+end_src +** Racket + +#+name: racket-dev +#+begin_src elisp :noweb no-export + +(package-install 'racket-mode) + +(add-hook 'racket-mode-hook #'enable-paredit-mode) +(add-hook 'racket-mode-hook 'display-line-numbers-mode) + +#+end_src + ** Haxe In order to use ~battle-haxe-mode~, you must put an ~.hxml~ file into @@ -1586,17 +1634,19 @@ libraries should be available (message "HAXE") (package-install 'haxe-mode) -(package-install 'battle-haxe) +;(package-install 'battle-haxe) -(add-hook 'haxe-mode-hook #'battle-haxe-mode) +;(add-hook 'haxe-mode-hook #'battle-haxe-mode) +(add-hook 'haxe-mode-hook 'display-line-numbers-mode) -(custom-set-variables - '(battle-haxe-immediate-completion t)) -(def-my-command my-haxe-mode-command - '((?. "[.] jump to definition" battle-haxe-goto-definition) - (?, "[,] pop global mark" pop-global-mark) - (?/ "[/] find references" battle-haxe-helm-find-references))) +;; (custom-set-variables +;; '(battle-haxe-immediate-completion nil)) + +;; (def-my-command my-haxe-mode-command +;; '((?. "[.] jump to definition" battle-haxe-goto-definition) +;; (?, "[,] pop global mark" pop-global-mark) +;; (?/ "[/] find references" battle-haxe-helm-find-references))) #+end_src #+RESULTS: haxe-config @@ -1606,11 +1656,11 @@ libraries should be available ** COMMENT Python #+name: python-config #+begin_src elisp :noweb no-export :results none -;; (message "PYTHON") -;; (package-install 'elpy) -;; (package-install 'flycheck) +(message "PYTHON") +(package-install 'elpy) +(package-install 'flycheck) -;; (elpy-enable) +(elpy-enable) ;; (package-install 'conda) ;; (require 'conda) ;; ;; if you want interactive shell support, include: @@ -1620,18 +1670,19 @@ libraries should be available ;; ;; if you want auto-activation (see below for details), include: ;; (conda-env-autoactivate-mode t) -;; (when (require 'flycheck nil t) -;; (setq elpy-modules (delq 'elpy-module-flymake elpy-modules)) -;; (add-hook 'elpy-mode-hook 'flycheck-mode)) +(when (require 'flycheck nil t) + (setq elpy-modules (delq 'elpy-module-flymake elpy-modules)) + (add-hook 'elpy-mode-hook 'flycheck-mode)) -;; (package-install 'ein) +(package-install 'ein) -;; (setq ein:output-area-inlined-images t) +(setq ein:output-area-inlined-images t) #+end_src * Tools + ** Export Emacs Buffer #+name: buffer-export-config |