Display cheatsheet in a separate buffer #3681
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:

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