Skip to content

Commit

Permalink
Add keybinding to the language selector tooltip (#21299)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
danilo-leal authored Nov 28, 2024
1 parent e765891 commit 3458687
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/language_selector/src/active_buffer_language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -54,7 +56,7 @@ impl Render for ActiveBufferLanguage {
});
}
}))
.tooltip(|cx| Tooltip::text("Select Language", cx)),
.tooltip(|cx| Tooltip::for_action("Select Language", &Toggle, cx)),
)
})
}
Expand Down

0 comments on commit 3458687

Please sign in to comment.