Additions for settings profile selector (#35439)

- Added profile selector to `zed > settings` submenu.
- Added examples to the `default.json` docs.
- Reduced length of the setting description that shows on autocomplete,
since it was cutoff in the autocomplete popover.


Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2025-07-31 18:20:35 -04:00 committed by GitHub
parent 410348deb0
commit 5feb759c20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 3 deletions

View file

@ -1878,7 +1878,24 @@
"dock": "bottom",
"button": true
},
// Configures any number of settings profiles that are temporarily applied
// when selected from `settings profile selector: toggle`.
// Configures any number of settings profiles that are temporarily applied on
// top of your existing user settings when selected from
// `settings profile selector: toggle`.
// Examples:
// "profiles": {
// "Presenting": {
// "agent_font_size": 20.0,
// "buffer_font_size": 20.0,
// "theme": "One Light",
// "ui_font_size": 20.0
// },
// "Python (ty)": {
// "languages": {
// "Python": {
// "language_servers": ["ty"]
// }
// }
// }
// }
"profiles": []
}

View file

@ -1078,7 +1078,7 @@ impl SettingsStore {
"preview": zed_settings_override_ref,
"profiles": {
"type": "object",
"description": "Configures any number of settings profiles that are temporarily applied when selected from `settings profile selector: toggle`.",
"description": "Configures any number of settings profiles.",
"additionalProperties": zed_settings_override_ref
}
}

View file

@ -24,6 +24,10 @@ pub fn app_menus() -> Vec<Menu> {
zed_actions::OpenDefaultKeymap,
),
MenuItem::action("Open Project Settings", super::OpenProjectSettings),
MenuItem::action(
"Select Settings Profile...",
zed_actions::settings_profile_selector::Toggle,
),
MenuItem::action(
"Select Theme...",
zed_actions::theme_selector::Toggle::default(),