Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add keybinding to the language selector tooltip (#21299)

Danilo Leal3458687300e6
diff --git a/crates/language_selector/src/active_buffer_language.rs b/crates/language_selector/src/active_buffer_language.rs
index 1d5f82d285b..bfa31b2f696 100644
--- a/crates/language_selector/src/active_buffer_language.rs
+++ b/crates/language_selector/src/active_buffer_language.rs
@@ -6,6 +6,8 @@ use workspace::{item::ItemHandle, StatusItemView, Workspace};
use crate::LanguageSelector;
+gpui::actions!(language_selector, [Toggle]);
+
pub struct ActiveBufferLanguage {
active_language: Option<Option<LanguageName>>,
workspace: WeakView<Workspace>,
@@ -54,7 +56,7 @@ impl Render for ActiveBufferLanguage {
});
}
}))
- .tooltip(|cx| Tooltip::text("Select Language", cx)),
+ .tooltip(|cx| Tooltip::for_action("Select Language", &Toggle, cx)),
)
})
}