Files
zed/crates/which_key/src/which_key_settings.rs
Xipeng Jin 83ca2f9e88 Add Vim-like Which-key Popup menu (#43618)
Closes #10910

Follow up work continuing from the last PR
https://github.com/zed-industries/zed/pull/42659. Add the UI element for
displaying vim like which-key menu.




https://github.com/user-attachments/assets/3dc5f0c9-5a2f-459e-a3db-859169aeba26


Release Notes:

- Added a which-key like modal with a compact, single-column panel
anchored to the bottom-right. You can enable with `{"which_key":
{"enabled": true}}` in your settings.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2025-12-17 11:53:48 -07:00

19 lines
528 B
Rust

use settings::{RegisterSetting, Settings, SettingsContent, WhichKeySettingsContent};
#[derive(Debug, Clone, Copy, RegisterSetting)]
pub struct WhichKeySettings {
pub enabled: bool,
pub delay_ms: u64,
}
impl Settings for WhichKeySettings {
fn from_settings(content: &SettingsContent) -> Self {
let which_key: &WhichKeySettingsContent = content.which_key.as_ref().unwrap();
Self {
enabled: which_key.enabled.unwrap(),
delay_ms: which_key.delay_ms.unwrap(),
}
}
}