clojure-emacs / cider

The Clojure Interactive Development Environment that Rocks for Emacs
https://cider.mx
GNU General Public License v3.0
3.52k stars 643 forks source link

Display cheatsheet in a separate buffer #3681

Closed katomuso closed 1 month ago

katomuso commented 1 month ago

While thinking about #3678 on how we can improve the current cheatsheet interface, I came up with the idea that we need to make it possible to display cheatsheet in a separate buffer.

The current cheatsheet is a subset of the official cheatsheet, displaying only functions using completion interface. However, by displaying cheatsheet in a buffer, we can have a richer output and make it identical to the official cheatsheet in terms of the information it provides. For example, we can make headings clickable to link to documentation, and we can display literals and other strings from the official cheatsheet that are currently omitted.

Here is how it looks at this point: cheatsheet-buffer

Following the naming pattern of cider-apropos and cider-apropos-select, I've divided this functionality into two commands: cider-cheatsheet, which displays cheatsheet in the *cider-cheatsheet* buffer, and cider-cheatsheet-select, which provides a completion interface (as the current cider-cheatsheet command does).

bbatsov commented 1 month ago

Can you share some screenshot showing the proposed UI?

bbatsov commented 1 month ago

Seems we have forgotten to document this functionality completely, so it will also be nice to add some section about the cider-cheatsheet commands here https://docs.cider.mx/cider/usage/misc_features.html

katomuso commented 1 month ago

Can you share some screenshot showing the proposed UI?

I've updated the description with a screenshot. Right now, it is nothing fancy, but it is a base on which we can iterate.

katomuso commented 1 month ago

Seems we have forgotten to document this functionality completely, so it will also be nice to add some section about the cider-cheatsheet commands here https://docs.cider.mx/cider/usage/misc_features.html

Okay, I'll do it. In the near future, I plan a series of changes. Should I do this now or after that?

bbatsov commented 1 month ago

Okay, I'll do it. In the near future, I plan a series of changes. Should I do this now or after that?

You can do this later then. For now just add some changelog entry about the new way to display the cheatsheet.

katomuso commented 1 month ago

I've updated the changelog. Since this is my first time doing so, I hope I did it correctly, though I was unsure about the order of the entries, as they don't appear to be ordered by PR number.

bbatsov commented 1 month ago

though I was unsure about the order of the entries, as they don't appear to be ordered by PR number.

The ordering doesn't matter much, as long changes are in the right section. Thanks!