gpui: Store action documentation (#33809)

Closes #ISSUE

Adds a new `documentation` method to actions, that is extracted from doc
comments when using the `actions!` or derive macros.

Additionally, this PR adds doc comments to as many action definitions in
Zed as possible.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Ben Kunkle 2025-07-02 20:14:33 -05:00 committed by GitHub
parent def8bab5a8
commit 6cd4dbdea1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
96 changed files with 1467 additions and 78 deletions

View file

@ -1368,6 +1368,7 @@ fn dump_all_gpui_actions() {
name: &'static str,
human_name: String,
aliases: &'static [&'static str],
documentation: Option<&'static str>,
}
let mut actions = gpui::generate_list_of_all_registered_actions()
.into_iter()
@ -1375,6 +1376,7 @@ fn dump_all_gpui_actions() {
name: action.name,
human_name: command_palette::humanize_action_name(action.name),
aliases: action.deprecated_aliases,
documentation: action.documentation,
})
.collect::<Vec<ActionDef>>();