From 6a7a3b257a960174b6ecf90fcafa20095d8ed8d1 Mon Sep 17 00:00:00 2001 From: Jadi Date: Sat, 9 Mar 2024 02:16:47 +0330 Subject: [PATCH] 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)) --- crates/theme/src/settings.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/theme/src/settings.rs b/crates/theme/src/settings.rs index 1b860dec92b34b5e2222f02e631084425c346f9c..2bce00c408b026fbaaba94760b42b6c27a561c70 100644 --- a/crates/theme/src/settings.rs +++ b/crates/theme/src/settings.rs @@ -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, + /// The name of a font to use for rendering in the UI. #[serde(default)] pub ui_font_family: Option, + /// The OpenType features to enable for text in the UI. #[serde(default)] pub ui_font_features: Option, + /// The name of a font to use for rendering in text buffers. #[serde(default)] pub buffer_font_family: Option, + /// The default font size for rendering in text buffers. #[serde(default)] pub buffer_font_size: Option, + /// The buffer's line height. #[serde(default)] pub buffer_line_height: Option, + /// The OpenType features to enable for rendering in text buffers. #[serde(default)] pub buffer_font_features: Option, + /// The name of the Zed theme to use. #[serde(default)] pub theme: Option,