diff --git a/ha-applications.org b/ha-applications.org index 4e24c2c..5285f2c 100644 --- a/ha-applications.org +++ b/ha-applications.org @@ -64,7 +64,7 @@ When my /artificial intern/ completes a task, I have long since nipped out to th I would like the /intern/ to notify me when it needs attention, so I noticed the [[https://github.com/zackattackz/agent-shell-notifications/][agent-shell-notifications]] project can connect the =agent-shell= project with the [[https://github.com/konrad1977/knockknock/][knock-knock]] project (which is similar to my [[https://howardism.org/Technical/Emacs/beep-for-emacs.html][beep project]]). -#+BEGIN_SRC emacs-lisp :tangle no +#+BEGIN_SRC emacs-lisp (use-package knockknock :quelpa (knockknock :fetcher github :repo "konrad1977/knockknock") :init diff --git a/ha-aux-apps.org b/ha-aux-apps.org index 17ba899..28673b6 100644 --- a/ha-aux-apps.org +++ b/ha-aux-apps.org @@ -188,7 +188,7 @@ Working on my new replacement of my DM code: #+begin_src emacs-lisp (when (f-directory? "~/src/emacs-rpgtk") (use-package rpgtk - :quelpa (:local-repo "~/src/emacs-rpgtk") + :quelpa (rpgtk :fetcher file :path "~/src/emacs-rpgtk") :after hydra ;; :commands (rpgtk-mode rpgtk-tables-load rpgtk-dice rpgtk-message) :custom @@ -202,7 +202,7 @@ Working on my new replacement of my DM code: And my [[https://gitlab.com/howardabrams/emacs-ironsworn][new Ironsworn project]] expands on it, giving me both the Oracles and the Moves. With an Org file, I can easily play Solo: -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (when (f-directory? "~/src/emacs-ironsworn") (use-package rpgdm-ironsworn :after rpgdm diff --git a/ha-display.org b/ha-display.org index 60710f9..a3cf899 100644 --- a/ha-display.org +++ b/ha-display.org @@ -45,10 +45,11 @@ Let's turn off the menu and other settings: ** Mode Line Let's install and load some of packages from the [[https://github.com/hlissner/doom-emacs][Doom Emacs]] project, like [[https://github.com/seagle0128/doom-modeline][doom-modeline]] and maybe the themes: -#+begin_src emacs-lisp :tangle no +#+begin_src emacs-lisp (use-package doom-modeline :after nerd-icons - :init + :quelpa (:fetcher github :repo "seagle0128/doom-modeline") + :config (setq doom-modeline-minor-modes nil doom-modeline-buffer-encoding nil doom-modeline-major-mode-color-icon t @@ -62,12 +63,11 @@ Let's install and load some of packages from the [[https://github.com/hlissner/d After reading [[https://blog.davep.org/2026/06/12/simplifying-my-mode-line.html][this essay]], I decided to try -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (use-package mood-line :ensure t :custom - ;; (mood-line-format mood-line-format-default) - (setq mood-line-glyph-alist mood-line-glyphs-fira-code) + (mood-line-glyph-alist mood-line-glyphs-fira-code) :config (mood-line-mode 1) @@ -449,13 +449,15 @@ The [[https://github.com/rainstormstudio/nerd-icons.el][nerd-icons]] project int This project replaces [[https://github.com/domtronn/all-the-icons.el][all-the-icons]], which isn’t needed anymore. -#+BEGIN_SRC emacs-lisp :tangle no +#+BEGIN_SRC emacs-lisp (use-package nerd-icons :ensure t ;; :quelpa (:fetcher github :repo "emacsmirror/nerd-icons.el") :custom ;; The Nerd Font you want to use in GUI defaults to fixed-font: - (nerd-icons-font-family ha-fixed-font)) + (nerd-icons-font-family ha-fixed-font) + :config + (defun nerd-icons--mode-parents (&rest ignored) (interactive))) #+END_SRC The way we access the /font icons/ has always been … odd; needing to specify the collection, etc. I would like to come up with a better mechanism, so the following function abstracts that as I figure out a better solution. diff --git a/ha-programming.org b/ha-programming.org index de6ca37..725c5b1 100644 --- a/ha-programming.org +++ b/ha-programming.org @@ -431,7 +431,7 @@ Note that Emacs already has the ability to download and install grammars, so fol (setq treesit-language-source-alist '((bash "https://github.com/tree-sitter/tree-sitter-bash") ;; (c "https://github.com/tree-sitter/tree-sitter-c/" "master" "src") - (clojure "https://github.com/sogaiu/tree-sitter-clojure" "master" "src") + ;; (clojure "https://github.com/sogaiu/tree-sitter-clojure" "master" "src") ;; (cpp "https://github.com/tree-sitter/tree-sitter-cpp/" "master" "src") ;; (cmake "https://github.com/uyha/tree-sitter-cmake") (css "https://github.com/tree-sitter/tree-sitter-css") @@ -442,8 +442,8 @@ Note that Emacs already has the ability to download and install grammars, so fol ;; (elisp "https://github.com/Wilfred/tree-sitter-elisp") ;; (elixir "https://github.com/elixir-lang/tree-sitter-elixir" "main" "src") ;; (erlang "https://github.com/WhatsApp/tree-sitter-erlang" "main" "src") - (go "https://github.com/tree-sitter/tree-sitter-go") - (templ "https://github.com/vrischmann/tree-sitter-templ") + ;; (go "https://github.com/tree-sitter/tree-sitter-go") + ;; (templ "https://github.com/vrischmann/tree-sitter-templ") ;; (haskell "https://github.com/tree-sitter/tree-sitter-haskell" "master" "src") (html "https://github.com/tree-sitter/tree-sitter-html") ;; (java "https://github.com/tree-sitter/tree-sitter-java" "master" "src") @@ -455,8 +455,8 @@ Note that Emacs already has the ability to download and install grammars, so fol (markdown "https://github.com/ikatyang/tree-sitter-markdown") ;; (meson "https://github.com/Decodetalkers/tree-sitter-meson" "master" "src") (python "https://github.com/tree-sitter/tree-sitter-python") - (ruby "https://github.com/tree-sitter/tree-sitter-ruby" "master" "src") - (rust "https://github.com/tree-sitter/tree-sitter-rust" "master" "src") + ;; (ruby "https://github.com/tree-sitter/tree-sitter-ruby" "master" "src") + ;; (rust "https://github.com/tree-sitter/tree-sitter-rust" "master" "src") (toml "https://github.com/tree-sitter/tree-sitter-toml") ;; (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") ;; (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") @@ -503,83 +503,87 @@ And enable the languages: #+end_src *** Combobulate I like [[file:ha-programming-elisp.org::*Clever Parenthesis][Clever Parenthesis]], but can we extend that to other languages generally? After reading Mickey Petersen’s essay, [[https://www.masteringemacs.org/article/combobulate-structured-movement-editing-treesitter][Combobulate project]], I decided to try out his [[https://github.com/mickeynp/combobulate][combobulate package]]. Of course, this can only work with the underlying tooling supplied by the [[https://emacs-tree-sitter.github.io/][Tree Sitter]] → -#+begin_src emacs-lisp - (when (treesit-available-p) +#+begin_src emacs-lisp :tangle no (use-package combobulate - :quelpa (:fetcher github :repo "mickeynp/combobulate") - :after treesit + :if (treesit-available-p) + :quelpa (:fetcher github :repo "mickeynp/combobulate") + :after treesit :hook ((yaml-ts-mode . combobulate-mode) ;; (css-ts-mode . combobulate-mode) ;; (json-ts-mode . combobulate-mode) ;; (python-ts-mode . combobulate-mode) ) - )) + ) #+end_src Now, I can create an /interface/ of keystrokes to jump around like a boss: -#+begin_src emacs-lisp - (when (treesit-available-p) - (use-package combobulate - :general - (:states 'visual :keymaps 'combobulate-key-map - "o" '("mark node" . combobulate-mark-node-dwim)) ; Mark symbol since "o" doesn't do anything - (:states 'normal :keymaps 'combobulate-key-map - "g J" '("avy jump" . combobulate-avy) - "[ [" '("prev node" . combobulate-navigate-logical-previous) - "] ]" '("next node" . combobulate-navigate-logical-next) - "[ f" '("prev defun" . combobulate-navigate-beginning-of-defun) - "] f" '("next defun" . combobulate-navigate-end-of-defun) +#+begin_src emacs-lisp :tangle no + (use-package combobulate + :if (treesit-available-p) + :quelpa (:fetcher github :repo "mickeynp/combobulate") + :after treesit + :general + (:states 'visual :keymaps 'combobulate-key-map + "o" '("mark node" . combobulate-mark-node-dwim)) ; Mark symbol since "o" doesn't do anything + (:states 'normal :keymaps 'combobulate-key-map + "g J" '("avy jump" . combobulate-avy) + "[ [" '("prev node" . combobulate-navigate-logical-previous) + "] ]" '("next node" . combobulate-navigate-logical-next) + "[ f" '("prev defun" . combobulate-navigate-beginning-of-defun) + "] f" '("next defun" . combobulate-navigate-end-of-defun) - "[ m" '("drag back" . combobulate-drag-up) - "] m" '("drag forward" . combobulate-drag-down) - "[ r" '("raise" . combobulate-vanish-node) + "[ m" '("drag back" . combobulate-drag-up) + "] m" '("drag forward" . combobulate-drag-down) + "[ r" '("raise" . combobulate-vanish-node) - "g j" '(:ignore t :which-key "combobulate jump") - "g j j" '("all" . combobulate-avy-jump) - "g j s" '("strings" . ha-combobulate-string) - "g j c" '("comments" . ha-combobulate-comment) - "g j i" '("conditionals" . ha-combobulate-conditional) - "g j l" '("loops" . ha-combobulate-loop) - "g j f" '("functions" . combobulate-avy-jump-defun)) + "g j" '(:ignore t :which-key "combobulate jump") + "g j j" '("all" . combobulate-avy-jump) + "g j s" '("strings" . ha-combobulate-string) + "g j c" '("comments" . ha-combobulate-comment) + "g j i" '("conditionals" . ha-combobulate-conditional) + "g j l" '("loops" . ha-combobulate-loop) + "g j f" '("functions" . combobulate-avy-jump-defun)) - :pretty-hydra - ((:color pink :quit-key "q") - ("Navigation" - (("j" combobulate-navigate-logical-next "Next") - ("k" combobulate-navigate-logical-previous "Previous") - ("h" combobulate-navigate-beginning-of-defun "Defun <") - ("l" combobulate-navigate-end-of-defun "Defun >") - ("g" combobulate-avy-jump "Avy Jump")) - "Push" - (("U" combobulate-drag-up "Drag back") - ("D" combobulate-drag-down "Drag forward") - ("R" combobulate-vanish-node "Drag back")) - "Jump" - (("s" ha-combobulate-string "to string" :color blue) - ("c" ha-combobulate-comment "comments" :color blue) - ("i" ha-combobulate-conditional "conditionals" :color blue) - ("l" ha-combobulate-loop "loops" :color blue) - ("f" combobulate-avy-jump-defun "to defuns" :color blue)))))) + :pretty-hydra + ((:color pink :quit-key "q") + ("Navigation" + (("j" combobulate-navigate-logical-next "Next") + ("k" combobulate-navigate-logical-previous "Previous") + ("h" combobulate-navigate-beginning-of-defun "Defun <") + ("l" combobulate-navigate-end-of-defun "Defun >") + ("g" combobulate-avy-jump "Avy Jump")) + "Push" + (("U" combobulate-drag-up "Drag back") + ("D" combobulate-drag-down "Drag forward") + ("R" combobulate-vanish-node "Drag back")) + "Jump" + (("s" ha-combobulate-string "to string" :color blue) + ("c" ha-combobulate-comment "comments" :color blue) + ("i" ha-combobulate-conditional "conditionals" :color blue) + ("l" ha-combobulate-loop "loops" :color blue) + ("f" combobulate-avy-jump-defun "to defuns" :color blue))))) #+end_src Mickey’s interface is the [[help:combobulate][combobulate]] function (or ~C-c o o~), but mine is more /evil/. I can create a /helper function/ to allow me to jump to various types of—well, /types/: -#+begin_src emacs-lisp - (when (treesit-available-p) - (use-package combobulate - :config - (defun ha-combobulate-string () - "Call `combobulate-avy-jump' searching for strings." - (interactive) - (with-navigation-nodes (:nodes '("string")) - (combobulate-avy-jump)))) +#+begin_src emacs-lisp :tangle no + (use-package combobulate + :if (treesit-available-p) + :quelpa (:fetcher github :repo "mickeynp/combobulate") + :after treesit + :config + (defun ha-combobulate-string () + "Call `combobulate-avy-jump' searching for strings." + (interactive) + (with-navigation-nodes (:nodes '("string")) + (combobulate-avy-jump))) (defun ha-combobulate-comment () "Call `combobulate-avy-jump' searching for comments." (interactive) (with-navigation-nodes (:nodes '("comment")) - (combobulate-avy-jump))) + (combobulate-avy-jump))) (defun ha-combobulate-conditional () "Call `combobulate-avy-jump' searching for conditionals." @@ -588,7 +592,7 @@ I can create a /helper function/ to allow me to jump to various types of—well, "if_statement" "if_clause" "else_clause" "elif_clause")) - (combobulate-avy-jump))) + (combobulate-avy-jump))) (defun ha-combobulate-loop () "Call `combobulate-avy-jump' searching for loops." @@ -597,7 +601,7 @@ I can create a /helper function/ to allow me to jump to various types of—well, "while_statement" "list_comprehension" "dictionary_comprehension" "set_comprehension")) - (combobulate-avy-jump)))) + (combobulate-avy-jump)))) #+end_src *** Evil Text Object from Tree Sitter @@ -1383,3 +1387,7 @@ Before you can build this on a new system, make sure that you put the cursor ove #+options: num:nil toc:t todo:nil tasks:nil tags:nil date:nil #+options: skip:nil author:nil email:nil creator:nil timestamp:nil #+infojs_opt: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js + +# Local Variables: +# jinx-local-words: "combobulate" +# End: diff --git a/initialize b/initialize index 74f06fd..9dfc6e8 100755 --- a/initialize +++ b/initialize @@ -145,6 +145,9 @@ cat > "$HAMACS_DEST/init.el" <