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/ui-theme.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/ui-theme.el')
| -rw-r--r-- | modules/ui-theme.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/ui-theme.el b/modules/ui-theme.el index eb4efd9b5..499e71a49 100644 --- a/modules/ui-theme.el +++ b/modules/ui-theme.el @@ -37,13 +37,17 @@ ;; ------------------------------- Switch Themes ------------------------------- ;; loads themes in completing read, then persists via the functions below +(require 'system-lib) + (defun cj/switch-themes () "Function to switch themes and save chosen theme name for persistence. Unloads any other applied themes before applying the chosen theme." (interactive) (let ((chosentheme (completing-read "Load custom theme: " - (mapcar #'symbol-name - (custom-available-themes))))) + (cj/completion-table + 'theme + (mapcar #'symbol-name + (custom-available-themes)))))) (cj/theme-disable-all) (cj/theme-load-name chosentheme)) (cj/save-theme-to-file)) |
