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:
parent
def8bab5a8
commit
6cd4dbdea1
96 changed files with 1467 additions and 78 deletions
|
@ -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>>();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue