-
-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current way of displaying cheatsheet is inconvenient #3678
Comments
Thank you for the tidbits of information 😌
John Boyd
…On Fri, May 24, 2024, 4:18 AM Kato Muso ***@***.***> wrote:
Initially, cheatsheet was designed to display the entire hierarchy in a
single Helm buffer (as seen in the screenshot at
https://github.com/clojure-emacs/clojure-cheatsheet), allowing the user
to search through the entire cheatsheet at once. However, the current
implementation using completing-read requires us to navigate one level of
the hierarchy at a time. This is much less convenient because we need to
know where the item we are looking for is located, and even if we do know,
it takes additional steps to do so.
Instead of having multiple completions for each level of the hierarchy, we
can represent the hierarchy in a flat view, so a single line will display
the full path to an item, with the path elements separated by a specific
separator. For example, lines might look like Collections > Maps > Change
> clojure.core/assoc with > as the separator. Using a fuzzy completion
style (such as the one provided by the orderless.el package), we will be
able to search for any element within the path, potentially displaying
matches from multiple sections at the same time, which is especially
convenient when displaying completions vertically (for example, with the
vertico.el package).
This can be implemented by transforming the hierarchy into an appropriate
flat format that will be displayed using completing-read. When the user
selects a line, we split it by the separator and get the last item, which
is the symbol. Then, we show the documentation for it as usual. I can do
this, but I'm not sure if it's better to implement it as a separate
function that can be called alternatively to cider-cheatsheet (something
like cider-cheatsheet-flat) or to alternate the behavior of
cider-cheatsheet when a prefix argument is passed.
—
Reply to this email directly, view it on GitHub
<#3678>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYXHWKHKIRAPTAUHQYFZDDZD3ZVZAVCNFSM6AAAAABIHDL3BOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYTINZTGM3DONY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I'd be fine with this. It's true that the current UI is a bit clunky with the separate section selection step. |
Good! I have some preliminary work done, now I just need to think about how to best implement it from a user interaction perspective. |
Initially, cheatsheet was designed to display the entire hierarchy in a single Helm buffer (as seen in the screenshot at https://github.com/clojure-emacs/clojure-cheatsheet), allowing the user to search through the entire cheatsheet at once. However, the current implementation using
completing-read
requires us to navigate one level of the hierarchy at a time. This is much less convenient because we need to know where the item we are looking for is located, and even if we do know, it takes additional steps to do so.Instead of having multiple completions for each level of the hierarchy, we can represent the hierarchy in a flat view, so a single line will display the full path to an item, with the path elements separated by a specific separator. For example, lines might look like
Collections > Maps > Change > clojure.core/assoc
with>
as the separator. Using a fuzzy completion style (such as the one provided by theorderless.el
package), we will be able to search for any element within the path, potentially displaying matches from multiple sections at the same time, which is especially convenient when displaying completions vertically (for example, with thevertico.el
package).This can be implemented by transforming the hierarchy into an appropriate flat format that will be displayed using
completing-read
. When the user selects a line, we split it by the separator and get the last item, which is the symbol. Then, we show the documentation for it as usual. I can do this, but I'm not sure if it's better to implement it as a separate function that can be called alternatively tocider-cheatsheet
(something likecider-cheatsheet-flat
) or to alternate the behavior ofcider-cheatsheet
when a prefix argument is passed.The text was updated successfully, but these errors were encountered: