Skip to content

Automatically generate book documentation of all commands #3840

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

Closed
wants to merge 25 commits into from

Conversation

A-Walrus
Copy link
Contributor

Resolves #3705

Currently very much WIP.

@kirawi kirawi added A-documentation Area: Documentation improvements S-waiting-on-review Status: Awaiting review from a maintainer. labels Sep 14, 2022
@A-Walrus A-Walrus marked this pull request as ready for review September 15, 2022 10:16
Copy link
Contributor

@AlexanderBrevig AlexanderBrevig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good! Added a few comments/questions/thoughts. My 0x10.

@@ -163,7 +193,6 @@ pub fn default() -> HashMap<Mode, Keymap> {

"A-:" => ensure_selections_forward,

"esc" => normal_mode,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we get plugins, it may be good to still trigger the normal_mode, so plugins can react to the fact that the user wants to opt out (close modals or whatever). Unless the plan is for the modals/plugins to all specify their escape much like the current ones do such as space k.
Just my immediate thoughts.

goto_line_end, "Goto line end",
goto_next_buffer, "Goto next buffer",
goto_previous_buffer, "Goto previous buffer",
no_op, "Do nothing", [], None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorting the commands by 1) category (None, Movement, ...) then alphabetically then aligning the different parts vertically would make it much easier to read this block

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorting it alphabetically would separate many related commands that are currently next to eachother, for example prepend_to_line and append_to_line.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Then only by category maybe ? I feel like making this easier to maintain will only help as more commands are added, but I don't know if there is a good way to do it

Since the prompt and the picker don't use a keymap and instead are hard-
coded, for now, I added documenation for them in the files
`book/src/keymap/picker.md` and `book/src/keymap/prompt.md`.
NOTE: Unlike the rest of the keymap documenation, this is not auto-
generated
@poliorcetics
Copy link
Contributor

That's not on you, nor for this PR to fix, but the Other category could be split a little afterwards, e.g. gathering the dap_ commands in their own section

@pascalkuthe
Copy link
Member

closing this PR as stale, thank you for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Documentation improvements S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document all commands and key bindings
5 participants