Add keybinding to the language selector tooltip (#21299)

Just making sure sure we're always making keyboard navigation
discoverable.

<img width="700" alt="Screenshot 2024-11-28 at 16 05 40"
src="https://github.com/user-attachments/assets/bd7611f0-190c-4e3b-ad69-9552060e37ea">

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2024-11-28 18:28:20 -03:00 committed by GitHub
parent e76589107d
commit 3458687300
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)),
)
})
}