Initial work on Quelpa

This commit is contained in:
Howard Abrams 2026-08-10 21:48:10 -07:00
parent cb8ce478cc
commit 4a8926bae7
5 changed files with 85 additions and 72 deletions

View file

@ -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]]). 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 (use-package knockknock
:quelpa (knockknock :fetcher github :repo "konrad1977/knockknock") :quelpa (knockknock :fetcher github :repo "konrad1977/knockknock")
:init :init

View file

@ -188,7 +188,7 @@ Working on my new replacement of my DM code:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(when (f-directory? "~/src/emacs-rpgtk") (when (f-directory? "~/src/emacs-rpgtk")
(use-package rpgtk (use-package rpgtk
:quelpa (:local-repo "~/src/emacs-rpgtk") :quelpa (rpgtk :fetcher file :path "~/src/emacs-rpgtk")
:after hydra :after hydra
;; :commands (rpgtk-mode rpgtk-tables-load rpgtk-dice rpgtk-message) ;; :commands (rpgtk-mode rpgtk-tables-load rpgtk-dice rpgtk-message)
:custom :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: 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") (when (f-directory? "~/src/emacs-ironsworn")
(use-package rpgdm-ironsworn (use-package rpgdm-ironsworn
:after rpgdm :after rpgdm

View file

@ -45,10 +45,11 @@ Let's turn off the menu and other settings:
** Mode Line ** 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: 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 (use-package doom-modeline
:after nerd-icons :after nerd-icons
:init :quelpa (:fetcher github :repo "seagle0128/doom-modeline")
:config
(setq doom-modeline-minor-modes nil (setq doom-modeline-minor-modes nil
doom-modeline-buffer-encoding nil doom-modeline-buffer-encoding nil
doom-modeline-major-mode-color-icon t 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 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 (use-package mood-line
:ensure t :ensure t
:custom :custom
;; (mood-line-format mood-line-format-default) (mood-line-glyph-alist mood-line-glyphs-fira-code)
(setq mood-line-glyph-alist mood-line-glyphs-fira-code)
:config :config
(mood-line-mode 1) (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. 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 (use-package nerd-icons
:ensure t :ensure t
;; :quelpa (:fetcher github :repo "emacsmirror/nerd-icons.el") ;; :quelpa (:fetcher github :repo "emacsmirror/nerd-icons.el")
:custom :custom
;; The Nerd Font you want to use in GUI defaults to fixed-font: ;; 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 #+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. 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.

View file

@ -431,7 +431,7 @@ Note that Emacs already has the ability to download and install grammars, so fol
(setq treesit-language-source-alist (setq treesit-language-source-alist
'((bash "https://github.com/tree-sitter/tree-sitter-bash") '((bash "https://github.com/tree-sitter/tree-sitter-bash")
;; (c "https://github.com/tree-sitter/tree-sitter-c/" "master" "src") ;; (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") ;; (cpp "https://github.com/tree-sitter/tree-sitter-cpp/" "master" "src")
;; (cmake "https://github.com/uyha/tree-sitter-cmake") ;; (cmake "https://github.com/uyha/tree-sitter-cmake")
(css "https://github.com/tree-sitter/tree-sitter-css") (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") ;; (elisp "https://github.com/Wilfred/tree-sitter-elisp")
;; (elixir "https://github.com/elixir-lang/tree-sitter-elixir" "main" "src") ;; (elixir "https://github.com/elixir-lang/tree-sitter-elixir" "main" "src")
;; (erlang "https://github.com/WhatsApp/tree-sitter-erlang" "main" "src") ;; (erlang "https://github.com/WhatsApp/tree-sitter-erlang" "main" "src")
(go "https://github.com/tree-sitter/tree-sitter-go") ;; (go "https://github.com/tree-sitter/tree-sitter-go")
(templ "https://github.com/vrischmann/tree-sitter-templ") ;; (templ "https://github.com/vrischmann/tree-sitter-templ")
;; (haskell "https://github.com/tree-sitter/tree-sitter-haskell" "master" "src") ;; (haskell "https://github.com/tree-sitter/tree-sitter-haskell" "master" "src")
(html "https://github.com/tree-sitter/tree-sitter-html") (html "https://github.com/tree-sitter/tree-sitter-html")
;; (java "https://github.com/tree-sitter/tree-sitter-java" "master" "src") ;; (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") (markdown "https://github.com/ikatyang/tree-sitter-markdown")
;; (meson "https://github.com/Decodetalkers/tree-sitter-meson" "master" "src") ;; (meson "https://github.com/Decodetalkers/tree-sitter-meson" "master" "src")
(python "https://github.com/tree-sitter/tree-sitter-python") (python "https://github.com/tree-sitter/tree-sitter-python")
(ruby "https://github.com/tree-sitter/tree-sitter-ruby" "master" "src") ;; (ruby "https://github.com/tree-sitter/tree-sitter-ruby" "master" "src")
(rust "https://github.com/tree-sitter/tree-sitter-rust" "master" "src") ;; (rust "https://github.com/tree-sitter/tree-sitter-rust" "master" "src")
(toml "https://github.com/tree-sitter/tree-sitter-toml") (toml "https://github.com/tree-sitter/tree-sitter-toml")
;; (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") ;; (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
;; (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") ;; (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
@ -503,83 +503,87 @@ And enable the languages:
#+end_src #+end_src
*** Combobulate *** 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]] → 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 #+begin_src emacs-lisp :tangle no
(when (treesit-available-p)
(use-package combobulate (use-package combobulate
:quelpa (:fetcher github :repo "mickeynp/combobulate") :if (treesit-available-p)
:after treesit :quelpa (:fetcher github :repo "mickeynp/combobulate")
:after treesit
:hook ((yaml-ts-mode . combobulate-mode) :hook ((yaml-ts-mode . combobulate-mode)
;; (css-ts-mode . combobulate-mode) ;; (css-ts-mode . combobulate-mode)
;; (json-ts-mode . combobulate-mode) ;; (json-ts-mode . combobulate-mode)
;; (python-ts-mode . combobulate-mode) ;; (python-ts-mode . combobulate-mode)
) )
)) )
#+end_src #+end_src
Now, I can create an /interface/ of keystrokes to jump around like a boss: Now, I can create an /interface/ of keystrokes to jump around like a boss:
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle no
(when (treesit-available-p) (use-package combobulate
(use-package combobulate :if (treesit-available-p)
:general :quelpa (:fetcher github :repo "mickeynp/combobulate")
(:states 'visual :keymaps 'combobulate-key-map :after treesit
"o" '("mark node" . combobulate-mark-node-dwim)) ; Mark symbol since "o" doesn't do anything :general
(:states 'normal :keymaps 'combobulate-key-map (:states 'visual :keymaps 'combobulate-key-map
"g J" '("avy jump" . combobulate-avy) "o" '("mark node" . combobulate-mark-node-dwim)) ; Mark symbol since "o" doesn't do anything
"[ [" '("prev node" . combobulate-navigate-logical-previous) (:states 'normal :keymaps 'combobulate-key-map
"] ]" '("next node" . combobulate-navigate-logical-next) "g J" '("avy jump" . combobulate-avy)
"[ f" '("prev defun" . combobulate-navigate-beginning-of-defun) "[ [" '("prev node" . combobulate-navigate-logical-previous)
"] f" '("next defun" . combobulate-navigate-end-of-defun) "] ]" '("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 back" . combobulate-drag-up)
"] m" '("drag forward" . combobulate-drag-down) "] m" '("drag forward" . combobulate-drag-down)
"[ r" '("raise" . combobulate-vanish-node) "[ r" '("raise" . combobulate-vanish-node)
"g j" '(:ignore t :which-key "combobulate jump") "g j" '(:ignore t :which-key "combobulate jump")
"g j j" '("all" . combobulate-avy-jump) "g j j" '("all" . combobulate-avy-jump)
"g j s" '("strings" . ha-combobulate-string) "g j s" '("strings" . ha-combobulate-string)
"g j c" '("comments" . ha-combobulate-comment) "g j c" '("comments" . ha-combobulate-comment)
"g j i" '("conditionals" . ha-combobulate-conditional) "g j i" '("conditionals" . ha-combobulate-conditional)
"g j l" '("loops" . ha-combobulate-loop) "g j l" '("loops" . ha-combobulate-loop)
"g j f" '("functions" . combobulate-avy-jump-defun)) "g j f" '("functions" . combobulate-avy-jump-defun))
:pretty-hydra :pretty-hydra
((:color pink :quit-key "q") ((:color pink :quit-key "q")
("Navigation" ("Navigation"
(("j" combobulate-navigate-logical-next "Next") (("j" combobulate-navigate-logical-next "Next")
("k" combobulate-navigate-logical-previous "Previous") ("k" combobulate-navigate-logical-previous "Previous")
("h" combobulate-navigate-beginning-of-defun "Defun <") ("h" combobulate-navigate-beginning-of-defun "Defun <")
("l" combobulate-navigate-end-of-defun "Defun >") ("l" combobulate-navigate-end-of-defun "Defun >")
("g" combobulate-avy-jump "Avy Jump")) ("g" combobulate-avy-jump "Avy Jump"))
"Push" "Push"
(("U" combobulate-drag-up "Drag back") (("U" combobulate-drag-up "Drag back")
("D" combobulate-drag-down "Drag forward") ("D" combobulate-drag-down "Drag forward")
("R" combobulate-vanish-node "Drag back")) ("R" combobulate-vanish-node "Drag back"))
"Jump" "Jump"
(("s" ha-combobulate-string "to string" :color blue) (("s" ha-combobulate-string "to string" :color blue)
("c" ha-combobulate-comment "comments" :color blue) ("c" ha-combobulate-comment "comments" :color blue)
("i" ha-combobulate-conditional "conditionals" :color blue) ("i" ha-combobulate-conditional "conditionals" :color blue)
("l" ha-combobulate-loop "loops" :color blue) ("l" ha-combobulate-loop "loops" :color blue)
("f" combobulate-avy-jump-defun "to defuns" :color blue)))))) ("f" combobulate-avy-jump-defun "to defuns" :color blue)))))
#+end_src #+end_src
Mickey’s interface is the [[help:combobulate][combobulate]] function (or ~C-c o o~), but mine is more /evil/. 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/: I can create a /helper function/ to allow me to jump to various types of—well, /types/:
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle no
(when (treesit-available-p) (use-package combobulate
(use-package combobulate :if (treesit-available-p)
:config :quelpa (:fetcher github :repo "mickeynp/combobulate")
(defun ha-combobulate-string () :after treesit
"Call `combobulate-avy-jump' searching for strings." :config
(interactive) (defun ha-combobulate-string ()
(with-navigation-nodes (:nodes '("string")) "Call `combobulate-avy-jump' searching for strings."
(combobulate-avy-jump)))) (interactive)
(with-navigation-nodes (:nodes '("string"))
(combobulate-avy-jump)))
(defun ha-combobulate-comment () (defun ha-combobulate-comment ()
"Call `combobulate-avy-jump' searching for comments." "Call `combobulate-avy-jump' searching for comments."
(interactive) (interactive)
(with-navigation-nodes (:nodes '("comment")) (with-navigation-nodes (:nodes '("comment"))
(combobulate-avy-jump))) (combobulate-avy-jump)))
(defun ha-combobulate-conditional () (defun ha-combobulate-conditional ()
"Call `combobulate-avy-jump' searching for conditionals." "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_statement"
"if_clause" "else_clause" "if_clause" "else_clause"
"elif_clause")) "elif_clause"))
(combobulate-avy-jump))) (combobulate-avy-jump)))
(defun ha-combobulate-loop () (defun ha-combobulate-loop ()
"Call `combobulate-avy-jump' searching for loops." "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" "while_statement" "list_comprehension"
"dictionary_comprehension" "dictionary_comprehension"
"set_comprehension")) "set_comprehension"))
(combobulate-avy-jump)))) (combobulate-avy-jump))))
#+end_src #+end_src
*** Evil Text Object from Tree Sitter *** 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: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
#+options: skip:nil author:nil email:nil creator:nil timestamp: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 #+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:

View file

@ -145,6 +145,9 @@ cat > "$HAMACS_DEST/init.el" <<EOF
(setq use-package-ensure-function 'quelpa) (setq use-package-ensure-function 'quelpa)
;; Fix a problem or two:
(defun nerd-icons--mode-parents (&rest ignored))
;; Let's rock: ;; Let's rock:
(org-babel-load-file "$HAMACS_DIR/bootstrap.org") (org-babel-load-file "$HAMACS_DIR/bootstrap.org")