Add missing docstrings to settings.rs (#9054)

![image](https://github.com/zed-industries/zed/assets/1290639/46c13110-8506-4b03-91d4-b1cfcafe824a)

Add documentation for theme-related settings.

Release Notes:

- Add documentation for theme-related settings ([8383](https://github.com/zed-industries/zed/issues/8383))
This commit is contained in:
Jadi 2024-03-09 02:16:47 +03:30 committed by GitHub
parent 8a6264d933
commit 6a7a3b257a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -155,22 +155,31 @@ impl ThemeSelection {
}
}
/// Settings for rendering text in UI and text buffers.
#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema)]
pub struct ThemeSettingsContent {
/// The default font size for text in the UI.
#[serde(default)]
pub ui_font_size: Option<f32>,
/// The name of a font to use for rendering in the UI.
#[serde(default)]
pub ui_font_family: Option<String>,
/// The OpenType features to enable for text in the UI.
#[serde(default)]
pub ui_font_features: Option<FontFeatures>,
/// The name of a font to use for rendering in text buffers.
#[serde(default)]
pub buffer_font_family: Option<String>,
/// The default font size for rendering in text buffers.
#[serde(default)]
pub buffer_font_size: Option<f32>,
/// The buffer's line height.
#[serde(default)]
pub buffer_line_height: Option<BufferLineHeight>,
/// The OpenType features to enable for rendering in text buffers.
#[serde(default)]
pub buffer_font_features: Option<FontFeatures>,
/// The name of the Zed theme to use.
#[serde(default)]
pub theme: Option<ThemeSelection>,