Make slash commands more discoverable (#12480)

<img width="648" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/a63df904-fbbe-4e0a-80b2-c98ebee90690">

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2024-05-30 16:45:05 +02:00 committed by GitHub
parent 436a8fa0ce
commit a259042f92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 172 additions and 100 deletions

View file

@ -19,8 +19,8 @@ impl SlashCommand for ActiveSlashCommand {
"insert active tab".into()
}
fn tooltip_text(&self) -> String {
"insert active tab".into()
fn menu_text(&self) -> String {
"Insert Active Tab".into()
}
fn complete_argument(

View file

@ -86,11 +86,11 @@ impl SlashCommand for FileSlashCommand {
}
fn description(&self) -> String {
"insert a file".into()
"insert file".into()
}
fn tooltip_text(&self) -> String {
"insert file".into()
fn menu_text(&self) -> String {
"Insert File".into()
}
fn requires_argument(&self) -> bool {

View file

@ -94,11 +94,11 @@ impl SlashCommand for ProjectSlashCommand {
}
fn description(&self) -> String {
"insert current project context".into()
"insert project metadata".into()
}
fn tooltip_text(&self) -> String {
"insert current project context".into()
fn menu_text(&self) -> String {
"Insert Project Metadata".into()
}
fn complete_argument(

View file

@ -25,11 +25,11 @@ impl SlashCommand for PromptSlashCommand {
}
fn description(&self) -> String {
"insert a prompt from the library".into()
"insert prompt from library".into()
}
fn tooltip_text(&self) -> String {
"insert prompt".into()
fn menu_text(&self) -> String {
"Insert Prompt from Library".into()
}
fn requires_argument(&self) -> bool {

View file

@ -51,11 +51,11 @@ impl SlashCommand for RustdocSlashCommand {
}
fn description(&self) -> String {
"insert the docs for a Rust crate".into()
"insert Rust docs".into()
}
fn tooltip_text(&self) -> String {
"insert rustdoc".into()
fn menu_text(&self) -> String {
"Insert Rust Documentation".into()
}
fn requires_argument(&self) -> bool {

View file

@ -32,11 +32,11 @@ impl SlashCommand for SearchSlashCommand {
}
fn description(&self) -> String {
"semantically search files".into()
"semantic search".into()
}
fn tooltip_text(&self) -> String {
"search".into()
fn menu_text(&self) -> String {
"Semantic Search".into()
}
fn requires_argument(&self) -> bool {

View file

@ -17,11 +17,11 @@ impl SlashCommand for TabsSlashCommand {
}
fn description(&self) -> String {
"insert content from open tabs".into()
"insert open tabs".into()
}
fn tooltip_text(&self) -> String {
"insert open tabs".into()
fn menu_text(&self) -> String {
"Insert Open Tabs".into()
}
fn requires_argument(&self) -> bool {