straight.el
straight.el copied to clipboard
Completion functions and annotations
This patch modifies straight--select-package
and straight--get-recipe
to use completion functions instead of tables. The completion function allows for
- Setting the completion category to
'straight-recipe
, which is useful for packages like Embark. - Showing extra metadata when the completion UI supports annotations (see screenshot below, using Vertico).
I will test this out later tonight and leave more if I notice anything else.
Thanks for the helpful review @progfolio! I'm working on a newer version that fixes the style issues you've pointed out. I'm also improving the annotator function:
- If a package recipe is cached, it shows the source repository
- Otherwise it shows the recipe source (melpa, elpa, etc.)
You might want to wait for the new version before testing it, to save some time :)
I have pushed the new version with better annotations and improved coding style and documentation. Let me know what you think.
The completion for installed packages now looks like this: Note that the remote URL for "helpful" shown here is from my personal fork, not the original recipe. Remote URLs are truncated by Vertico if they don't fit on one line.
The completion for recipe-related functions looks like this: It now shows the upstream remote for "helpful".
Based off of lack of activity, I'm closing this pull request. If you are still interested in working on this, let me know and we can reopen. Thanks.