diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-27 13:02:48 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-27 13:02:48 -0400 |
| commit | 25860cf8825d80fe06a89b934d0bd4c20164510a (patch) | |
| tree | 7e3ab3d5848b9efb72b36f6eef1f74cc3762ddbe /modules/signal-config.el | |
| parent | 8e730450802f992c35e3dd9bedc14b06249e957a (diff) | |
| download | dotemacs-25860cf8825d80fe06a89b934d0bd4c20164510a.tar.gz dotemacs-25860cf8825d80fe06a89b934d0bd4c20164510a.zip | |
feat(completion): annotate the Signal and contact pickers via categories
Two pickers have bare-name candidates worth a category: the Signal recipient picker, where a name maps to a phone or UUID, and org-contacts find, where a name maps to an email. I tag each with a custom category and a table annotation-function that shows the looked-up value. marginalia has no annotator for these custom categories, so it leaves the table's annotation in place. The other Tier-2 candidates from the survey (ai-term projects, the mu4e contact list) already carry their info inline, so a category adds nothing and I left them bare.
Diffstat (limited to 'modules/signal-config.el')
| -rw-r--r-- | modules/signal-config.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/signal-config.el b/modules/signal-config.el index 86cb523c..edb7d0dc 100644 --- a/modules/signal-config.el +++ b/modules/signal-config.el @@ -309,7 +309,13 @@ opens the chosen recipient in `signel-chat'." (candidates (cons note-self cj/signel--contact-cache)) (table (lambda (string pred action) (if (eq action 'metadata) - '(metadata + `(metadata + (category . signal-contact) + (annotation-function + . ,(lambda (cand) + (let ((r (cdr (assoc cand candidates)))) + (when r + (concat " " (propertize r 'face 'completions-annotations)))))) (display-sort-function . identity) (cycle-sort-function . identity)) (complete-with-action action candidates string pred)))) |
