diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-27 12:55:58 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-27 12:55:58 -0400 |
| commit | a7c2c3a98e1e193e348bf3f918ba49763acb339b (patch) | |
| tree | a4e02c803fa71ea90558703d4bc4c2a48675d495 /modules/ai-term.el | |
| parent | f69ab2e215397183c5d7832629ab4430f62589da (diff) | |
| download | dotemacs-a7c2c3a98e1e193e348bf3f918ba49763acb339b.tar.gz dotemacs-a7c2c3a98e1e193e348bf3f918ba49763acb339b.zip | |
feat(completion): tag four pickers with categories for marginalia
Add cj/completion-table (and an annotated variant) to system-lib: a wrapper that tags any collection with a completion category so marginalia, embark, consult, and sorting can recognize the candidates. None of the config's completing-reads declared a category, so the rich-candidate pickers showed bare. This applies it to the four whose candidates match a standard category and so need no custom annotator: benchmark-method (function), ERC buffer switch (buffer), ai-term close (buffer), and theme switch (theme). Each now annotates for free.
Diffstat (limited to 'modules/ai-term.el')
| -rw-r--r-- | modules/ai-term.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/ai-term.el b/modules/ai-term.el index 3beabe6b5..03c9a4046 100644 --- a/modules/ai-term.el +++ b/modules/ai-term.el @@ -959,6 +959,8 @@ when BUFFER isn't an AI-term buffer." (let ((kill-buffer-query-functions nil)) (kill-buffer buffer)))) +(require 'system-lib) + (defun cj/--ai-term-close-target () "Return the AI-term buffer `cj/ai-term-close' should act on, or nil. @@ -973,7 +975,8 @@ buffers; nil when none are alive." ((null (cdr buffers)) (car buffers)) (t (get-buffer (completing-read "Close AI terminal: " - (mapcar #'buffer-name buffers) nil t)))))))) + (cj/completion-table 'buffer (mapcar #'buffer-name buffers)) + nil t)))))))) (defun cj/ai-term-close () "Gracefully close an AI-term agent: kill its tmux session and buffer. |
