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]]).
#+BEGIN_SRC emacs-lisp :tangle no
#+BEGIN_SRC emacs-lisp
(use-package knockknock
:quelpa (knockknock :fetcher github :repo "konrad1977/knockknock")
:init

View file

@ -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

View file

@ -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.

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
'((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,9 +503,9 @@ 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
:if (treesit-available-p)
:quelpa (:fetcher github :repo "mickeynp/combobulate")
:after treesit
:hook ((yaml-ts-mode . combobulate-mode)
@ -513,13 +513,15 @@ I like [[file:ha-programming-elisp.org::*Clever Parenthesis][Clever Parenthesis]
;; (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)
#+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
@ -559,21 +561,23 @@ Now, I can create an /interface/ of keystrokes to jump around like a boss:
("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))))))
("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)
#+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))))
(combobulate-avy-jump)))
(defun ha-combobulate-comment ()
"Call `combobulate-avy-jump' searching for comments."
@ -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:

View file

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