Skip to content

Commit

Permalink
Fiddle with describe-racket-package annotation faces
Browse files Browse the repository at this point in the history
  • Loading branch information
greghendershott committed Oct 23, 2024
1 parent 9505cbc commit dc41b99
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions racket-package.el
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,17 @@ Allows users to customize via `completion-category-overrides'.")
(pcase-let*
((pkgs (racket--cmd/await nil `(pkg-list)))
(pkgs (seq-map (pcase-lambda (`(,name ,stat ,desc))
(propertize name
'racket-affix (list stat desc)))
(let* ((stat-face
(pcase stat
("installed" 'font-lock-escape-face)
("dependency" 'font-lock-keyword-face)
("available" 'completions-annotations)))
(stat (propertize stat 'face stat-face))
(desc (propertize desc 'face 'font-lock-doc-face)))
(propertize name
'racket-affix (list stat desc))))
pkgs))
(affix (racket--make-affix [16 11 [0 font-lock-doc-face]]))
(affix (racket--make-affix [16 [11 nil] [0 nil]]))
(val (completing-read "Describe Racket package: "
(racket--completion-table
pkgs
Expand Down

0 comments on commit dc41b99

Please sign in to comment.