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 21:14:33 -04:00
committed by GitHub
parent def8bab5a8
commit 6cd4dbdea1
96 changed files with 1467 additions and 78 deletions
+18 -2
View File
@@ -28,10 +28,26 @@ use crate::{
ui_components::table::{Table, TableInteractionState},
};
actions!(zed, [OpenKeymapEditor]);
actions!(
zed,
[
/// Opens the keymap editor.
OpenKeymapEditor
]
);
const KEYMAP_EDITOR_NAMESPACE: &'static str = "keymap_editor";
actions!(keymap_editor, [EditBinding, CopyAction, CopyContext]);
actions!(
keymap_editor,
[
/// Edits the selected key binding.
EditBinding,
/// Copies the action name to clipboard.
CopyAction,
/// Copies the context predicate to clipboard.
CopyContext
]
);
pub fn init(cx: &mut App) {
let keymap_event_channel = KeymapEventChannel::new();