settings ui: Add missing setting elements (#39644)
Added the following settings to the UI Editor Page - Scrollbar Section (9 settings) - Show - Cursors - Git Diff - Search Results - Selected Text - Selected Symbol - Diagnostics - Horizontal Scrollbar - Vertical Scrollbar Editor Page - Minimap Section (6 settings) - Show - Display In - Thumb - Thumb Border - Current Line Highlight - Max Width Columns Editor Page - Editor Behavior Section (3 settings) - Expand Excerpt Lines - Excerpt Context Lines - Minimum Contrast For Highlights Debugger Page (7 settings) - Stepping Granularity - Save Breakpoints - Timeout - Dock - Log DAP Communications - Format DAP Log Messages - Button Panels Page - Git Panel Section (3 settings) - Button - Dock - Default Width Collaboration Page - Experimental Section (4 settings) - Auto Microphone Volume - Auto Speaker Volume - Denoise - Legacy Audio Compatible Release Notes: - N/A
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use std::fmt::Display;
|
||||
use std::num;
|
||||
|
||||
use collections::HashMap;
|
||||
@@ -153,7 +154,8 @@ pub struct EditorSettingsContent {
|
||||
///
|
||||
/// Values range from 0 to 106. Set to 0 to disable adjustments.
|
||||
/// Default: 45
|
||||
pub minimum_contrast_for_highlights: Option<f32>,
|
||||
#[schemars(range(min = 0, max = 106))]
|
||||
pub minimum_contrast_for_highlights: Option<MinimumContrast>,
|
||||
|
||||
/// Whether to follow-up empty go to definition responses from the language server or not.
|
||||
/// `FindAllReferences` allows to look up references of the same symbol instead.
|
||||
@@ -425,7 +427,18 @@ pub enum DoubleClickInMultibuffer {
|
||||
///
|
||||
/// Default: always
|
||||
#[derive(
|
||||
Copy, Clone, Debug, Default, Serialize, Deserialize, JsonSchema, MergeFrom, PartialEq, Eq,
|
||||
Copy,
|
||||
Clone,
|
||||
Debug,
|
||||
Default,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
JsonSchema,
|
||||
MergeFrom,
|
||||
PartialEq,
|
||||
Eq,
|
||||
strum::VariantArray,
|
||||
strum::VariantNames,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum MinimapThumb {
|
||||
@@ -440,7 +453,18 @@ pub enum MinimapThumb {
|
||||
///
|
||||
/// Default: left_open
|
||||
#[derive(
|
||||
Copy, Clone, Debug, Default, Serialize, Deserialize, JsonSchema, MergeFrom, PartialEq, Eq,
|
||||
Copy,
|
||||
Clone,
|
||||
Debug,
|
||||
Default,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
JsonSchema,
|
||||
MergeFrom,
|
||||
PartialEq,
|
||||
Eq,
|
||||
strum::VariantArray,
|
||||
strum::VariantNames,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum MinimapThumbBorder {
|
||||
@@ -460,7 +484,19 @@ pub enum MinimapThumbBorder {
|
||||
/// Which diagnostic indicators to show in the scrollbar.
|
||||
///
|
||||
/// Default: all
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, MergeFrom, PartialEq, Eq)]
|
||||
#[derive(
|
||||
Copy,
|
||||
Clone,
|
||||
Debug,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
JsonSchema,
|
||||
MergeFrom,
|
||||
PartialEq,
|
||||
Eq,
|
||||
strum::VariantArray,
|
||||
strum::VariantNames,
|
||||
)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum ScrollbarDiagnostics {
|
||||
/// Show all diagnostic levels: hint, information, warnings, error.
|
||||
@@ -682,7 +718,18 @@ pub struct DragAndDropSelectionContent {
|
||||
///
|
||||
/// Default: never
|
||||
#[derive(
|
||||
Copy, Clone, Debug, Default, Serialize, Deserialize, JsonSchema, MergeFrom, PartialEq, Eq,
|
||||
Copy,
|
||||
Clone,
|
||||
Debug,
|
||||
Default,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
JsonSchema,
|
||||
MergeFrom,
|
||||
PartialEq,
|
||||
Eq,
|
||||
strum::VariantArray,
|
||||
strum::VariantNames,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ShowMinimap {
|
||||
@@ -699,7 +746,18 @@ pub enum ShowMinimap {
|
||||
///
|
||||
/// Default: all_editors
|
||||
#[derive(
|
||||
Copy, Clone, Debug, Default, Serialize, Deserialize, JsonSchema, MergeFrom, PartialEq, Eq,
|
||||
Copy,
|
||||
Clone,
|
||||
Debug,
|
||||
Default,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
JsonSchema,
|
||||
MergeFrom,
|
||||
PartialEq,
|
||||
Eq,
|
||||
strum::VariantArray,
|
||||
strum::VariantNames,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum DisplayIn {
|
||||
@@ -709,3 +767,28 @@ pub enum DisplayIn {
|
||||
#[default]
|
||||
ActiveEditor,
|
||||
}
|
||||
|
||||
/// Minimum APCA perceptual contrast for text over highlight backgrounds.
|
||||
///
|
||||
/// Valid range: 0.0 to 106.0
|
||||
/// Default: 45.0
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
JsonSchema,
|
||||
MergeFrom,
|
||||
PartialEq,
|
||||
PartialOrd,
|
||||
derive_more::FromStr,
|
||||
)]
|
||||
#[serde(transparent)]
|
||||
pub struct MinimumContrast(pub f32);
|
||||
|
||||
impl Display for MinimumContrast {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{:.1}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ pub struct GitSettings {
|
||||
pub git_gutter: Option<GitGutterSetting>,
|
||||
/// Sets the debounce threshold (in milliseconds) after which changes are reflected in the git gutter.
|
||||
///
|
||||
/// Default: null
|
||||
/// Default: 0
|
||||
pub gutter_debounce: Option<u64>,
|
||||
/// Whether or not to show git blame data inline in
|
||||
/// the currently focused line.
|
||||
|
||||
@@ -199,7 +199,19 @@ impl TerminalLineHeight {
|
||||
/// When to show the scrollbar.
|
||||
///
|
||||
/// Default: auto
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, MergeFrom, PartialEq, Eq)]
|
||||
#[derive(
|
||||
Copy,
|
||||
Clone,
|
||||
Debug,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
JsonSchema,
|
||||
MergeFrom,
|
||||
PartialEq,
|
||||
Eq,
|
||||
strum::VariantArray,
|
||||
strum::VariantNames,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ShowScrollbar {
|
||||
/// Show the scrollbar if there's important information or
|
||||
|
||||
Reference in New Issue
Block a user