skip_serializing_with

Conrad Irwin created

Change summary

Cargo.lock                                             | 290 +++++++----
Cargo.toml                                             |   1 
crates/settings/Cargo.toml                             |   1 
crates/settings/src/base_keymap_setting.rs             |   2 
crates/settings/src/settings_content.rs                |  36 +
crates/settings/src/settings_content/agent.rs          |  10 
crates/settings/src/settings_content/editor.rs         |  11 
crates/settings/src/settings_content/language.rs       |  15 
crates/settings/src/settings_content/language_model.rs |  31 +
crates/settings/src/settings_content/project.rs        |  18 
crates/settings/src/settings_content/terminal.rs       |   6 
crates/settings/src/settings_content/theme.rs          |  11 
crates/settings/src/settings_content/workspace.rs      |   9 
crates/settings/src/settings_store.rs                  |  26 +
14 files changed, 363 insertions(+), 104 deletions(-)

Detailed changes

Cargo.lock 🔗

@@ -175,7 +175,7 @@ dependencies = [
  "rand 0.9.1",
  "ref-cast",
  "rope",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -205,7 +205,7 @@ dependencies = [
  "futures 0.3.31",
  "log",
  "parking_lot",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
 ]
@@ -257,7 +257,7 @@ dependencies = [
  "prompt_store",
  "reqwest_client",
  "rust-embed",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -335,7 +335,7 @@ dependencies = [
  "gpui",
  "language_model",
  "paths",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "serde_json_lenient",
@@ -410,7 +410,7 @@ dependencies = [
  "release_channel",
  "rope",
  "rules_library",
- "schemars",
+ "schemars 1.0.1",
  "search",
  "serde",
  "serde_json",
@@ -655,7 +655,7 @@ dependencies = [
  "chrono",
  "futures 0.3.31",
  "http_client",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -1006,7 +1006,7 @@ dependencies = [
  "regex",
  "reqwest_client",
  "rust-embed",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -1409,7 +1409,7 @@ dependencies = [
  "log",
  "parking_lot",
  "rodio",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "settings",
  "smol",
@@ -1442,7 +1442,7 @@ dependencies = [
  "log",
  "paths",
  "release_channel",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -2144,7 +2144,7 @@ dependencies = [
  "aws-sdk-bedrockruntime",
  "aws-smithy-types",
  "futures 0.3.31",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "strum 0.27.1",
@@ -2645,7 +2645,7 @@ dependencies = [
  "log",
  "postage",
  "project",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "settings",
  "telemetry",
@@ -2821,7 +2821,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "eadd868a2ce9ca38de7eeafdcec9c7065ef89b42b32f0839278d55f35c54d1ff"
 dependencies = [
  "heck 0.4.1",
- "indexmap",
+ "indexmap 2.9.0",
  "log",
  "proc-macro2",
  "quote",
@@ -3099,7 +3099,7 @@ dependencies = [
  "release_channel",
  "rpc",
  "rustls-pki-types",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "serde_urlencoded",
@@ -3410,7 +3410,7 @@ dependencies = [
  "project",
  "release_channel",
  "rpc",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -3432,7 +3432,7 @@ dependencies = [
 name = "collections"
 version = "0.1.0"
 dependencies = [
- "indexmap",
+ "indexmap 2.9.0",
  "rustc-hash 2.1.1",
  "workspace-hack",
 ]
@@ -3594,7 +3594,7 @@ dependencies = [
  "net",
  "parking_lot",
  "postage",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -4395,7 +4395,7 @@ dependencies = [
  "parking_lot",
  "paths",
  "proto",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -4415,7 +4415,7 @@ name = "dap-types"
 version = "0.0.1"
 source = "git+https://github.com/zed-industries/dap-types?rev=1b461b310481d01e02b2603c16d7144b926339f8#1b461b310481d01e02b2603c16d7144b926339f8"
 dependencies = [
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
 ]
@@ -4445,6 +4445,41 @@ dependencies = [
  "workspace-hack",
 ]
 
+[[package]]
+name = "darling"
+version = "0.20.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.20.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn 2.0.101",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.20.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn 2.0.101",
+]
+
 [[package]]
 name = "dashmap"
 version = "5.5.3"
@@ -4586,7 +4621,7 @@ dependencies = [
  "pretty_assertions",
  "project",
  "rpc",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "serde_json_lenient",
@@ -4627,7 +4662,7 @@ dependencies = [
  "anyhow",
  "futures 0.3.31",
  "http_client",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "workspace-hack",
@@ -4825,7 +4860,7 @@ dependencies = [
  "libc",
  "option-ext",
  "redox_users 0.5.0",
- "windows-sys 0.59.0",
+ "windows-sys 0.60.2",
 ]
 
 [[package]]
@@ -5087,7 +5122,7 @@ dependencies = [
  "regex",
  "release_channel",
  "rpc",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -5582,7 +5617,7 @@ dependencies = [
  "release_channel",
  "remote",
  "reqwest_client",
- "schemars",
+ "schemars 1.0.1",
  "semantic_version",
  "serde",
  "serde_json",
@@ -5779,7 +5814,7 @@ dependencies = [
  "picker",
  "pretty_assertions",
  "project",
- "schemars",
+ "schemars 1.0.1",
  "search",
  "serde",
  "serde_json",
@@ -6389,7 +6424,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
 dependencies = [
  "fallible-iterator",
- "indexmap",
+ "indexmap 2.9.0",
  "stable_deref_trait",
 ]
 
@@ -6412,7 +6447,7 @@ dependencies = [
  "rand 0.9.1",
  "regex",
  "rope",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "smol",
@@ -6454,7 +6489,7 @@ dependencies = [
  "indoc",
  "pretty_assertions",
  "regex",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -6499,7 +6534,7 @@ dependencies = [
  "postage",
  "pretty_assertions",
  "project",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -7334,7 +7369,7 @@ dependencies = [
  "menu",
  "project",
  "rope",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -7366,7 +7401,7 @@ dependencies = [
  "anyhow",
  "futures 0.3.31",
  "http_client",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -7468,7 +7503,7 @@ dependencies = [
  "reqwest_client",
  "resvg",
  "scap",
- "schemars",
+ "schemars 1.0.1",
  "seahash",
  "semantic_version",
  "serde",
@@ -7554,7 +7589,7 @@ dependencies = [
  "futures-sink",
  "futures-util",
  "http 0.2.12",
- "indexmap",
+ "indexmap 2.9.0",
  "slab",
  "tokio",
  "tokio-util",
@@ -7573,7 +7608,7 @@ dependencies = [
  "futures-core",
  "futures-sink",
  "http 1.3.1",
- "indexmap",
+ "indexmap 2.9.0",
  "slab",
  "tokio",
  "tokio-util",
@@ -8269,6 +8304,12 @@ version = "2.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005"
 
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
 [[package]]
 name = "idna"
 version = "1.0.3"
@@ -8351,7 +8392,7 @@ dependencies = [
  "language",
  "log",
  "project",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "settings",
  "theme",
@@ -8382,6 +8423,17 @@ version = "1.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408"
 
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown 0.12.3",
+ "serde",
+]
+
 [[package]]
 name = "indexmap"
 version = "2.9.0"
@@ -8746,7 +8798,7 @@ dependencies = [
  "hashbrown 0.15.3",
  "hex",
  "ignore",
- "indexmap",
+ "indexmap 2.9.0",
  "interim",
  "itertools 0.14.0",
  "jj-lib-proc-macros",
@@ -8843,7 +8895,7 @@ dependencies = [
  "editor",
  "gpui",
  "log",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "settings",
  "shellexpand 2.1.2",
@@ -9078,7 +9130,7 @@ dependencies = [
  "rand 0.9.1",
  "regex",
  "rpc",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -9152,7 +9204,7 @@ dependencies = [
  "open_router",
  "parking_lot",
  "proto",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -9201,7 +9253,7 @@ dependencies = [
  "partial-json-fixer",
  "project",
  "release_channel",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -9315,7 +9367,7 @@ dependencies = [
  "regex",
  "rope",
  "rust-embed",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "serde_json_lenient",
@@ -9729,7 +9781,7 @@ dependencies = [
  "anyhow",
  "futures 0.3.31",
  "http_client",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "workspace-hack",
@@ -9835,7 +9887,7 @@ dependencies = [
  "parking_lot",
  "postage",
  "release_channel",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "smol",
@@ -10372,7 +10424,7 @@ dependencies = [
  "anyhow",
  "futures 0.3.31",
  "http_client",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "strum 0.27.1",
@@ -10465,7 +10517,7 @@ dependencies = [
  "half",
  "hashbrown 0.15.3",
  "hexf-parse",
- "indexmap",
+ "indexmap 2.9.0",
  "log",
  "num-traits",
  "once_cell",
@@ -11123,7 +11175,7 @@ checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
 dependencies = [
  "crc32fast",
  "hashbrown 0.15.3",
- "indexmap",
+ "indexmap 2.9.0",
  "memchr",
 ]
 
@@ -11134,7 +11186,7 @@ dependencies = [
  "anyhow",
  "futures 0.3.31",
  "http_client",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -11163,7 +11215,7 @@ dependencies = [
  "notifications",
  "picker",
  "project",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "settings",
  "telemetry",
@@ -11243,7 +11295,7 @@ dependencies = [
  "futures 0.3.31",
  "http_client",
  "log",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -11258,7 +11310,7 @@ dependencies = [
  "anyhow",
  "futures 0.3.31",
  "http_client",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -11438,7 +11490,7 @@ dependencies = [
  "outline",
  "pretty_assertions",
  "project",
- "schemars",
+ "schemars 1.0.1",
  "search",
  "serde",
  "serde_json",
@@ -12139,7 +12191,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"
 dependencies = [
  "fixedbitset",
- "indexmap",
+ "indexmap 2.9.0",
 ]
 
 [[package]]
@@ -12213,7 +12265,7 @@ dependencies = [
  "env_logger 0.11.8",
  "gpui",
  "menu",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "ui",
@@ -12320,7 +12372,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "eac26e981c03a6e53e0aee43c113e3202f5581d5360dae7bd2c70e800dd0451d"
 dependencies = [
  "base64 0.22.1",
- "indexmap",
+ "indexmap 2.9.0",
  "quick-xml 0.32.0",
  "serde",
  "time",
@@ -12641,7 +12693,7 @@ dependencies = [
  "gpui",
  "http_client",
  "image",
- "indexmap",
+ "indexmap 2.9.0",
  "itertools 0.14.0",
  "language",
  "log",
@@ -12659,7 +12711,7 @@ dependencies = [
  "release_channel",
  "remote",
  "rpc",
- "schemars",
+ "schemars 1.0.1",
  "semver",
  "serde",
  "serde_json",
@@ -12701,12 +12753,12 @@ dependencies = [
  "git",
  "git_ui",
  "gpui",
- "indexmap",
+ "indexmap 2.9.0",
  "language",
  "menu",
  "pretty_assertions",
  "project",
- "schemars",
+ "schemars 1.0.1",
  "search",
  "serde",
  "serde_json",
@@ -13331,7 +13383,7 @@ dependencies = [
  "project",
  "release_channel",
  "remote",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -13504,7 +13556,7 @@ dependencies = [
  "prost 0.9.0",
  "release_channel",
  "rpc",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -13624,7 +13676,7 @@ dependencies = [
  "picker",
  "project",
  "runtimelib",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -14417,13 +14469,25 @@ dependencies = [
  "anyhow",
  "clap",
  "env_logger 0.11.8",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "theme",
  "workspace-hack",
 ]
 
+[[package]]
+name = "schemars"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f"
+dependencies = [
+ "dyn-clone",
+ "ref-cast",
+ "serde",
+ "serde_json",
+]
+
 [[package]]
 name = "schemars"
 version = "1.0.1"
@@ -14431,7 +14495,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "fe8c9d1c68d67dd9f97ecbc6f932b60eb289c5dbddd8aa1405484a8fd2fcd984"
 dependencies = [
  "dyn-clone",
- "indexmap",
+ "indexmap 2.9.0",
  "ref-cast",
  "schemars_derive",
  "serde",
@@ -14642,7 +14706,7 @@ dependencies = [
  "language",
  "menu",
  "project",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -14786,7 +14850,7 @@ version = "1.0.144"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "56177480b00303e689183f110b4e727bb4211d692c62d4fcd16d02be93077d40"
 dependencies = [
- "indexmap",
+ "indexmap 2.9.0",
  "itoa",
  "memchr",
  "ryu",
@@ -14799,7 +14863,7 @@ version = "0.2.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "0e033097bf0d2b59a62b42c18ebbb797503839b26afdda2c4e1415cb6c813540"
 dependencies = [
- "indexmap",
+ "indexmap 2.9.0",
  "itoa",
  "memchr",
  "ryu",
@@ -14848,6 +14912,37 @@ dependencies = [
  "serde",
 ]
 
+[[package]]
+name = "serde_with"
+version = "3.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf65a400f8f66fb7b0552869ad70157166676db75ed8181f8104ea91cf9d0b42"
+dependencies = [
+ "base64 0.22.1",
+ "chrono",
+ "hex",
+ "indexmap 1.9.3",
+ "indexmap 2.9.0",
+ "schemars 0.9.0",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "serde_with_macros",
+ "time",
+]
+
+[[package]]
+name = "serde_with_macros"
+version = "3.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81679d9ed988d5e9a5e6531dc3f2c28efbd639cbd1dfb628df08edea6004da77"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+]
+
 [[package]]
 name = "serial2"
 version = "0.2.29"
@@ -14888,12 +14983,13 @@ dependencies = [
  "pretty_assertions",
  "release_channel",
  "rust-embed",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "serde_json_lenient",
  "serde_path_to_error",
  "serde_repr",
+ "serde_with",
  "settings_ui_macros",
  "smallvec",
  "tree-sitter",
@@ -15222,7 +15318,7 @@ dependencies = [
  "indoc",
  "parking_lot",
  "paths",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json_lenient",
  "snippet",
@@ -15383,7 +15479,7 @@ dependencies = [
  "futures-util",
  "hashbrown 0.15.3",
  "hashlink 0.10.0",
- "indexmap",
+ "indexmap 2.9.0",
  "log",
  "memchr",
  "once_cell",
@@ -16268,7 +16364,7 @@ dependencies = [
  "menu",
  "picker",
  "project",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "settings",
@@ -16348,7 +16444,7 @@ dependencies = [
  "parking_lot",
  "pretty_assertions",
  "proto",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "serde_json_lenient",
@@ -16454,7 +16550,7 @@ dependencies = [
  "rand 0.9.1",
  "regex",
  "release_channel",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "settings",
  "smol",
@@ -16500,7 +16596,7 @@ dependencies = [
  "project",
  "rand 0.9.1",
  "regex",
- "schemars",
+ "schemars 1.0.1",
  "search",
  "serde",
  "serde_json",
@@ -16550,13 +16646,13 @@ dependencies = [
  "fs",
  "futures 0.3.31",
  "gpui",
- "indexmap",
+ "indexmap 2.9.0",
  "inventory",
  "log",
  "palette",
  "parking_lot",
  "refineable",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "serde_json_lenient",
@@ -16589,7 +16685,7 @@ dependencies = [
  "clap",
  "collections",
  "gpui",
- "indexmap",
+ "indexmap 2.9.0",
  "log",
  "palette",
  "serde",
@@ -16843,7 +16939,7 @@ dependencies = [
  "project",
  "remote",
  "rpc",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "settings",
  "smallvec",
@@ -17042,7 +17138,7 @@ version = "0.22.26"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e"
 dependencies = [
- "indexmap",
+ "indexmap 2.9.0",
  "serde",
  "serde_spanned",
  "toml_datetime",
@@ -17622,7 +17718,7 @@ dependencies = [
  "icons",
  "itertools 0.14.0",
  "menu",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "settings",
  "smallvec",
@@ -17897,7 +17993,7 @@ dependencies = [
  "rand 0.9.1",
  "regex",
  "rust-embed",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "serde_json_lenient",
@@ -18007,7 +18103,7 @@ name = "vercel"
 version = "0.1.0"
 dependencies = [
  "anyhow",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "strum 0.27.1",
  "workspace-hack",
@@ -18055,7 +18151,7 @@ dependencies = [
  "project_panel",
  "regex",
  "release_channel",
- "schemars",
+ "schemars 1.0.1",
  "search",
  "serde",
  "serde_json",
@@ -18312,7 +18408,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "0fd83062c17b9f4985d438603cde0a5e8c5c8198201a6937f778b607924c7da2"
 dependencies = [
  "anyhow",
- "indexmap",
+ "indexmap 2.9.0",
  "serde",
  "serde_derive",
  "serde_json",
@@ -18330,7 +18426,7 @@ dependencies = [
  "anyhow",
  "auditable-serde",
  "flate2",
- "indexmap",
+ "indexmap 2.9.0",
  "serde",
  "serde_derive",
  "serde_json",
@@ -18360,7 +18456,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708"
 dependencies = [
  "bitflags 2.9.0",
- "indexmap",
+ "indexmap 2.9.0",
  "semver",
 ]
 
@@ -18372,7 +18468,7 @@ checksum = "d06bfa36ab3ac2be0dee563380147a5b81ba10dd8885d7fbbc9eb574be67d185"
 dependencies = [
  "bitflags 2.9.0",
  "hashbrown 0.15.3",
- "indexmap",
+ "indexmap 2.9.0",
  "semver",
  "serde",
 ]
@@ -18385,7 +18481,7 @@ checksum = "0f51cad774fb3c9461ab9bccc9c62dfb7388397b5deda31bf40e8108ccd678b2"
 dependencies = [
  "bitflags 2.9.0",
  "hashbrown 0.15.3",
- "indexmap",
+ "indexmap 2.9.0",
  "semver",
 ]
 
@@ -18414,7 +18510,7 @@ dependencies = [
  "cfg-if",
  "encoding_rs",
  "hashbrown 0.14.5",
- "indexmap",
+ "indexmap 2.9.0",
  "libc",
  "log",
  "mach2 0.4.2",
@@ -18538,7 +18634,7 @@ dependencies = [
  "cranelift-bitset",
  "cranelift-entity",
  "gimli",
- "indexmap",
+ "indexmap 2.9.0",
  "log",
  "object",
  "postcard",
@@ -18663,7 +18759,7 @@ checksum = "8358319c2dd1e4db79e3c1c5d3a5af84956615343f9f89f4e4996a36816e06e6"
 dependencies = [
  "anyhow",
  "heck 0.5.0",
- "indexmap",
+ "indexmap 2.9.0",
  "wit-parser 0.221.3",
 ]
 
@@ -19739,7 +19835,7 @@ checksum = "d8a39a15d1ae2077688213611209849cad40e9e5cccf6e61951a425850677ff3"
 dependencies = [
  "anyhow",
  "heck 0.4.1",
- "indexmap",
+ "indexmap 2.9.0",
  "wasm-metadata 0.201.0",
  "wit-bindgen-core 0.22.0",
  "wit-component 0.201.0",
@@ -19753,7 +19849,7 @@ checksum = "9d0809dc5ba19e2e98661bf32fc0addc5a3ca5bf3a6a7083aa6ba484085ff3ce"
 dependencies = [
  "anyhow",
  "heck 0.5.0",
- "indexmap",
+ "indexmap 2.9.0",
  "prettyplease",
  "syn 2.0.101",
  "wasm-metadata 0.227.1",
@@ -19798,7 +19894,7 @@ checksum = "421c0c848a0660a8c22e2fd217929a0191f14476b68962afd2af89fd22e39825"
 dependencies = [
  "anyhow",
  "bitflags 2.9.0",
- "indexmap",
+ "indexmap 2.9.0",
  "log",
  "serde",
  "serde_derive",
@@ -19817,7 +19913,7 @@ checksum = "635c3adc595422cbf2341a17fb73a319669cc8d33deed3a48368a841df86b676"
 dependencies = [
  "anyhow",
  "bitflags 2.9.0",
- "indexmap",
+ "indexmap 2.9.0",
  "log",
  "serde",
  "serde_derive",
@@ -19836,7 +19932,7 @@ checksum = "196d3ecfc4b759a8573bf86a9b3f8996b304b3732e4c7de81655f875f6efdca6"
 dependencies = [
  "anyhow",
  "id-arena",
- "indexmap",
+ "indexmap 2.9.0",
  "log",
  "semver",
  "serde",
@@ -19854,7 +19950,7 @@ checksum = "896112579ed56b4a538b07a3d16e562d101ff6265c46b515ce0c701eef16b2ac"
 dependencies = [
  "anyhow",
  "id-arena",
- "indexmap",
+ "indexmap 2.9.0",
  "log",
  "semver",
  "serde",
@@ -19872,7 +19968,7 @@ checksum = "ddf445ed5157046e4baf56f9138c124a0824d4d1657e7204d71886ad8ce2fc11"
 dependencies = [
  "anyhow",
  "id-arena",
- "indexmap",
+ "indexmap 2.9.0",
  "log",
  "semver",
  "serde",
@@ -19922,7 +20018,7 @@ dependencies = [
  "pretty_assertions",
  "project",
  "remote",
- "schemars",
+ "schemars 1.0.1",
  "serde",
  "serde_json",
  "session",

Cargo.toml 🔗

@@ -625,6 +625,7 @@ serde_json_lenient = { version = "0.2", features = [
 serde_path_to_error = "0.1.17"
 serde_repr = "0.1"
 serde_urlencoded = "0.7"
+serde_with = "3.4.0"
 sha2 = "0.10"
 shellexpand = "2.1.0"
 shlex = "1.3.0"

crates/settings/Cargo.toml 🔗

@@ -34,6 +34,7 @@ settings_ui_macros.workspace = true
 serde_json_lenient.workspace = true
 serde_repr.workspace = true
 serde_path_to_error.workspace = true
+serde_with.workspace = true
 smallvec.workspace = true
 tree-sitter-json.workspace = true
 tree-sitter.workspace = true

crates/settings/src/base_keymap_setting.rs 🔗

@@ -7,6 +7,7 @@ use crate::{
 use gpui::App;
 use schemars::JsonSchema;
 use serde::{Deserialize, Serialize};
+use serde_with::skip_serializing_none;
 use settings::{Settings, VsCodeSettings};
 use settings_ui_macros::{SettingsKey, SettingsUi};
 
@@ -148,6 +149,7 @@ impl BaseKeymap {
 )]
 // extracted so that it can be an option, and still work with derive(SettingsUi)
 #[settings_key(None)]
+#[skip_serializing_none]
 pub struct BaseKeymapSetting {
     pub base_keymap: Option<BaseKeymap>,
 }

crates/settings/src/settings_content.rs 🔗

@@ -21,12 +21,14 @@ use gpui::{App, SharedString};
 use release_channel::ReleaseChannel;
 use schemars::JsonSchema;
 use serde::{Deserialize, Serialize};
+use serde_with::skip_serializing_none;
 use std::env;
 use std::sync::Arc;
 pub use util::serde::default_true;
 
 use crate::ActiveSettingsProfileName;
 
+#[skip_serializing_none]
 #[derive(Debug, PartialEq, Default, Clone, Serialize, Deserialize, JsonSchema)]
 pub struct SettingsContent {
     #[serde(flatten)]
@@ -159,12 +161,14 @@ impl SettingsContent {
 }
 
 // todo!() what should this be?
+#[skip_serializing_none]
 #[derive(Debug, Default, Serialize, Deserialize, JsonSchema)]
 pub struct ServerSettingsContent {
     #[serde(flatten)]
     pub project: ProjectSettingsContent,
 }
 
+#[skip_serializing_none]
 #[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize, JsonSchema)]
 pub struct UserSettingsContent {
     #[serde(flatten)]
@@ -230,6 +234,7 @@ pub enum BaseKeymapContent {
     None,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, PartialEq, Default, Serialize, Deserialize, JsonSchema, Debug)]
 pub struct TitleBarSettingsContent {
     /// Controls when the title bar is visible: "always" | "never" | "hide_in_full_screen".
@@ -275,6 +280,7 @@ pub enum TitleBarVisibility {
 }
 
 /// Configuration of audio in Zed.
+#[skip_serializing_none]
 #[derive(Clone, PartialEq, Default, Serialize, Deserialize, JsonSchema, Debug)]
 pub struct AudioSettingsContent {
     /// Opt into the new audio system.
@@ -296,6 +302,7 @@ pub struct AudioSettingsContent {
 }
 
 /// Control what info is collected by Zed.
+#[skip_serializing_none]
 #[derive(Default, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema, Debug)]
 pub struct TelemetrySettingsContent {
     /// Send debug info like crash reports.
@@ -308,6 +315,7 @@ pub struct TelemetrySettingsContent {
     pub metrics: Option<bool>,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema, Clone)]
 pub struct DebuggerSettingsContent {
     /// Determines the stepping granularity.
@@ -363,6 +371,7 @@ pub enum DockPosition {
 }
 
 /// Settings for slash commands.
+#[skip_serializing_none]
 #[derive(Deserialize, Serialize, Debug, Default, Clone, JsonSchema, PartialEq, Eq)]
 pub struct SlashCommandSettings {
     /// Settings for the `/cargo-workspace` slash command.
@@ -370,6 +379,7 @@ pub struct SlashCommandSettings {
 }
 
 /// Settings for the `/cargo-workspace` slash command.
+#[skip_serializing_none]
 #[derive(Deserialize, Serialize, Debug, Default, Clone, JsonSchema, PartialEq, Eq)]
 pub struct CargoWorkspaceCommandSettings {
     /// Whether `/cargo-workspace` is enabled.
@@ -377,6 +387,7 @@ pub struct CargoWorkspaceCommandSettings {
 }
 
 /// Configuration of voice calls in Zed.
+#[skip_serializing_none]
 #[derive(Clone, PartialEq, Default, Serialize, Deserialize, JsonSchema, Debug)]
 pub struct CallSettingsContent {
     /// Whether the microphone should be muted when joining a channel or a call.
@@ -390,6 +401,7 @@ pub struct CallSettingsContent {
     pub share_on_join: Option<bool>,
 }
 
+#[skip_serializing_none]
 #[derive(Deserialize, Serialize, PartialEq, Debug, Default, Clone, JsonSchema)]
 pub struct ExtensionSettingsContent {
     /// The extensions that should be automatically installed by Zed.
@@ -404,6 +416,7 @@ pub struct ExtensionSettingsContent {
     pub auto_update_extensions: HashMap<Arc<str>, bool>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, PartialEq, Default, Serialize, Deserialize, JsonSchema, Debug)]
 pub struct GitPanelSettingsContent {
     /// Whether to show the panel button in the status bar.
@@ -453,11 +466,13 @@ pub enum StatusStyle {
     LabelColor,
 }
 
+#[skip_serializing_none]
 #[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct ScrollbarSettings {
     pub show: Option<ShowScrollbar>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, PartialEq)]
 pub struct NotificationPanelSettingsContent {
     /// Whether to show the panel button in the status bar.
@@ -474,6 +489,7 @@ pub struct NotificationPanelSettingsContent {
     pub default_width: Option<f32>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, PartialEq)]
 pub struct PanelSettingsContent {
     /// Whether to show the panel button in the status bar.
@@ -490,6 +506,7 @@ pub struct PanelSettingsContent {
     pub default_width: Option<f32>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, PartialEq)]
 pub struct MessageEditorSettings {
     /// Whether to automatically replace emoji shortcodes with emoji characters.
@@ -499,6 +516,7 @@ pub struct MessageEditorSettings {
     pub auto_replace_emoji_shortcode: Option<bool>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, PartialEq)]
 pub struct FileFinderSettingsContent {
     /// Whether to show file icons in the file finder.
@@ -541,6 +559,7 @@ pub enum FileFinderWidthContent {
     Full,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Default, Serialize, Deserialize, PartialEq, Debug, JsonSchema)]
 pub struct VimSettingsContent {
     pub default_mode: Option<ModeContent>,
@@ -574,6 +593,7 @@ pub enum UseSystemClipboard {
 }
 
 /// The settings for cursor shape.
+#[skip_serializing_none]
 #[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
 pub struct CursorShapeSettings {
     /// Cursor shape for the normal mode.
@@ -595,6 +615,7 @@ pub struct CursorShapeSettings {
 }
 
 /// Settings specific to journaling
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
 pub struct JournalSettingsContent {
     /// The path of the directory where journal entries are stored.
@@ -615,6 +636,7 @@ pub enum HourFormat {
     Hour24,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, PartialEq)]
 pub struct OutlinePanelSettingsContent {
     /// Whether to show the outline panel button in the status bar.
@@ -683,6 +705,7 @@ pub enum ShowIndentGuides {
     Never,
 }
 
+#[skip_serializing_none]
 #[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct IndentGuidesSettingsContent {
     /// When to show the scrollbar in the outline panel.
@@ -698,6 +721,7 @@ pub enum LineIndicatorFormat {
 }
 
 /// The settings for the image viewer.
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, Default, PartialEq)]
 pub struct ImageViewerSettingsContent {
     /// The unit to use for displaying image file sizes.
@@ -706,6 +730,7 @@ pub struct ImageViewerSettingsContent {
     pub unit: Option<ImageFileSizeUnit>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Copy, Debug, Serialize, Deserialize, JsonSchema, Default, PartialEq)]
 #[serde(rename_all = "snake_case")]
 pub enum ImageFileSizeUnit {
@@ -716,38 +741,35 @@ pub enum ImageFileSizeUnit {
     Decimal,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq)]
 pub struct RemoteSettingsContent {
     pub ssh_connections: Option<Vec<SshConnection>>,
     pub read_ssh_config: Option<bool>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct SshConnection {
     pub host: SharedString,
-    #[serde(skip_serializing_if = "Option::is_none")]
     pub username: Option<String>,
-    #[serde(skip_serializing_if = "Option::is_none")]
     pub port: Option<u16>,
-    #[serde(skip_serializing_if = "Vec::is_empty")]
     #[serde(default)]
     pub args: Vec<String>,
     #[serde(default)]
     pub projects: collections::BTreeSet<SshProject>,
     /// Name to use for this server in UI.
-    #[serde(skip_serializing_if = "Option::is_none")]
     pub nickname: Option<String>,
     // By default Zed will download the binary to the host directly.
     // If this is set to true, Zed will download the binary to your local machine,
     // and then upload it over the SSH connection. Useful if your SSH server has
     // limited outbound internet access.
-    #[serde(skip_serializing_if = "Option::is_none")]
     pub upload_binary_over_ssh: Option<bool>,
 
-    #[serde(skip_serializing_if = "Option::is_none")]
     pub port_forwards: Option<Vec<SshPortForwardOption>>,
 }
 
+#[skip_serializing_none]
 #[derive(
     Clone, Debug, Default, Serialize, PartialEq, Eq, PartialOrd, Ord, Deserialize, JsonSchema,
 )]
@@ -755,6 +777,7 @@ pub struct SshProject {
     pub paths: Vec<String>,
 }
 
+#[skip_serializing_none]
 #[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, Serialize, JsonSchema)]
 pub struct SshPortForwardOption {
     #[serde(skip_serializing_if = "Option::is_none")]
@@ -766,6 +789,7 @@ pub struct SshPortForwardOption {
 }
 
 /// Settings for configuring REPL display and behavior.
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct ReplSettingsContent {
     /// Maximum number of lines to keep in REPL's scrollback buffer.

crates/settings/src/settings_content/agent.rs 🔗

@@ -2,10 +2,12 @@ use collections::{HashMap, IndexMap};
 use gpui::SharedString;
 use schemars::{JsonSchema, json_schema};
 use serde::{Deserialize, Serialize};
+use serde_with::skip_serializing_none;
 use std::{borrow::Cow, path::PathBuf, sync::Arc};
 
 use crate::DockPosition;
 
+#[skip_serializing_none]
 #[derive(Clone, PartialEq, Serialize, Deserialize, JsonSchema, Debug, Default)]
 pub struct AgentSettingsContent {
     /// Whether the Agent is enabled.
@@ -160,6 +162,8 @@ impl AgentSettingsContent {
         self.default_profile = Some(profile_id);
     }
 }
+
+#[skip_serializing_none]
 #[derive(Debug, PartialEq, Clone, Serialize, Deserialize, JsonSchema)]
 pub struct AgentProfileContent {
     pub name: Arc<str>,
@@ -171,6 +175,7 @@ pub struct AgentProfileContent {
     pub context_servers: IndexMap<Arc<str>, ContextServerPresetContent>,
 }
 
+#[skip_serializing_none]
 #[derive(Debug, PartialEq, Clone, Default, Serialize, Deserialize, JsonSchema)]
 pub struct ContextServerPresetContent {
     pub tools: IndexMap<Arc<str>, bool>,
@@ -193,6 +198,7 @@ pub enum NotifyWhenAgentWaiting {
     Never,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
 pub struct LanguageModelSelection {
     pub provider: LanguageModelProviderSetting,
@@ -208,6 +214,7 @@ pub enum CompletionMode {
     Burn,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
 pub struct LanguageModelParameters {
     pub provider: Option<LanguageModelProviderSetting>,
@@ -256,6 +263,7 @@ impl From<&str> for LanguageModelProviderSetting {
     }
 }
 
+#[skip_serializing_none]
 #[derive(Default, PartialEq, Deserialize, Serialize, Clone, JsonSchema, Debug)]
 pub struct AllAgentServersSettings {
     pub gemini: Option<BuiltinAgentServerSettings>,
@@ -266,6 +274,7 @@ pub struct AllAgentServersSettings {
     pub custom: HashMap<SharedString, CustomAgentServerSettings>,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Deserialize, Serialize, Clone, JsonSchema, Debug, PartialEq)]
 pub struct BuiltinAgentServerSettings {
     /// Absolute path to a binary to be used when launching this agent.
@@ -297,6 +306,7 @@ pub struct BuiltinAgentServerSettings {
     pub default_mode: Option<String>,
 }
 
+#[skip_serializing_none]
 #[derive(Deserialize, Serialize, Clone, JsonSchema, Debug, PartialEq)]
 pub struct CustomAgentServerSettings {
     #[serde(rename = "command")]

crates/settings/src/settings_content/editor.rs 🔗

@@ -3,9 +3,11 @@ use std::num;
 use collections::HashMap;
 use schemars::JsonSchema;
 use serde::{Deserialize, Serialize};
+use serde_with::skip_serializing_none;
 
 use crate::{DiagnosticSeverityContent, ShowScrollbar};
 
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct EditorSettingsContent {
     /// Whether the cursor blinks in the editor.
@@ -191,6 +193,7 @@ pub struct EditorSettingsContent {
 }
 
 // Status bar related settings
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct StatusBarContent {
     /// Whether to display the active language button in the status bar.
@@ -204,6 +207,7 @@ pub struct StatusBarContent {
 }
 
 // Toolbar related settings
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct ToolbarContent {
     /// Whether to display breadcrumbs in the editor toolbar.
@@ -230,6 +234,7 @@ pub struct ToolbarContent {
 }
 
 /// Scrollbar related settings
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Default)]
 pub struct ScrollbarContent {
     /// When to show the scrollbar in the editor.
@@ -265,6 +270,7 @@ pub struct ScrollbarContent {
 }
 
 /// Minimap related settings
+#[skip_serializing_none]
 #[derive(Clone, Default, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
 pub struct MinimapContent {
     /// When to show the minimap in the editor.
@@ -299,6 +305,7 @@ pub struct MinimapContent {
 }
 
 /// Forcefully enable or disable the scrollbar for each axis
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Default)]
 pub struct ScrollbarAxesContent {
     /// When false, forcefully disables the horizontal scrollbar. Otherwise, obey other settings.
@@ -313,6 +320,7 @@ pub struct ScrollbarAxesContent {
 }
 
 /// Gutter related settings
+#[skip_serializing_none]
 #[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct GutterContent {
     /// Whether to show line numbers in the gutter.
@@ -525,6 +533,7 @@ pub enum SnippetSortOrder {
 }
 
 /// Default options for buffer and project search items.
+#[skip_serializing_none]
 #[derive(Clone, Default, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct SearchSettingsContent {
     /// Whether to show the project search button in the status bar.
@@ -535,6 +544,7 @@ pub struct SearchSettingsContent {
     pub regex: Option<bool>,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
 #[serde(rename_all = "snake_case")]
 pub struct JupyterContent {
@@ -550,6 +560,7 @@ pub struct JupyterContent {
 }
 
 /// Whether to allow drag and drop text selection in buffer.
+#[skip_serializing_none]
 #[derive(Clone, Default, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct DragAndDropSelectionContent {
     /// When true, enables drag and drop text selection in buffer.

crates/settings/src/settings_content/language.rs 🔗

@@ -7,11 +7,13 @@ use serde::{
     Deserialize, Deserializer, Serialize,
     de::{self, IntoDeserializer, MapAccess, SeqAccess, Visitor},
 };
+use serde_with::skip_serializing_none;
 use std::sync::Arc;
 use util::schemars::replace_subschema;
 
 use crate::ParameterizedJsonSchema;
 
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct AllLanguageSettingsContent {
     /// The settings for enabling/disabling features.
@@ -33,6 +35,7 @@ pub struct AllLanguageSettingsContent {
 }
 
 /// The settings for enabling/disabling features.
+#[skip_serializing_none]
 #[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize, JsonSchema)]
 #[serde(rename_all = "snake_case")]
 pub struct FeaturesContent {
@@ -52,6 +55,7 @@ pub enum EditPredictionProvider {
 }
 
 /// The contents of the edit prediction settings.
+#[skip_serializing_none]
 #[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq)]
 pub struct EditPredictionSettingsContent {
     /// A list of globs representing files that edit predictions should be disabled for.
@@ -68,6 +72,7 @@ pub struct EditPredictionSettingsContent {
     pub enabled_in_text_threads: Option<bool>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq)]
 pub struct CopilotSettingsContent {
     /// HTTP/HTTPS proxy to use for Copilot.
@@ -116,6 +121,7 @@ pub enum SoftWrap {
 }
 
 /// The settings for a particular language.
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct LanguageSettingsContent {
     /// How many columns a tab should occupy.
@@ -303,6 +309,7 @@ pub enum ShowWhitespaceSetting {
     Trailing,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq)]
 pub struct WhitespaceMap {
     #[serde(default)]
@@ -338,9 +345,11 @@ pub enum RewrapBehavior {
     Anywhere,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
 pub struct JsxTagAutoCloseSettings {
     /// Enables or disables auto-closing of JSX tags.
+    // todo! option
     #[serde(default)]
     pub enabled: bool,
 }
@@ -348,6 +357,7 @@ pub struct JsxTagAutoCloseSettings {
 /// The settings for inlay hints.
 /// todo!() the fields of this struct should likely be optional,
 /// and a similar struct exposed from the language crate.
+#[skip_serializing_none]
 #[derive(Clone, Default, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct InlayHintSettingsContent {
     /// Global switch to toggle hints on and off.
@@ -429,6 +439,7 @@ impl InlayHintKind {
 }
 
 /// Controls how completions are processedfor this anguage.
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
 #[serde(rename_all = "snake_case")]
 pub struct CompletionSettings {
@@ -506,6 +517,7 @@ fn default_3() -> usize {
 /// Allows to enable/disable formatting with Prettier
 /// and configure default Prettier, used when no project-level Prettier installation is found.
 /// Prettier formatting is disabled by default.
+#[skip_serializing_none]
 #[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
 pub struct PrettierSettingsContent {
     /// Enables or disables formatting with Prettier for a given language.
@@ -766,6 +778,7 @@ pub enum Formatter {
 }
 
 /// The settings for indent guides.
+#[skip_serializing_none]
 #[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
 pub struct IndentGuideSettings {
     /// Whether to display indent guides in the editor.
@@ -808,6 +821,7 @@ fn active_line_width() -> u32 {
 }
 
 /// The task settings for a particular language.
+#[skip_serializing_none]
 #[derive(Debug, Clone, Deserialize, PartialEq, Serialize, JsonSchema)]
 pub struct LanguageTaskConfig {
     /// Extra task variables to set for a particular language.
@@ -828,6 +842,7 @@ pub struct LanguageTaskConfig {
 
 /// Map from language name to settings. Its `ParameterizedJsonSchema` allows only known language
 /// names in the keys.
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct LanguageToSettingsMap(pub HashMap<SharedString, LanguageSettingsContent>);
 

crates/settings/src/settings_content/language_model.rs 🔗

@@ -1,9 +1,11 @@
 use collections::HashMap;
 use schemars::JsonSchema;
 use serde::{Deserialize, Serialize};
+use serde_with::skip_serializing_none;
 
 use std::sync::Arc;
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct AllLanguageModelSettingsContent {
     pub anthropic: Option<AnthropicSettingsContent>,
@@ -22,12 +24,14 @@ pub struct AllLanguageModelSettingsContent {
     pub zed_dot_dev: Option<ZedDotDevSettingsContent>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct AnthropicSettingsContent {
     pub api_url: Option<String>,
     pub available_models: Option<Vec<AnthropicAvailableModel>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct AnthropicAvailableModel {
     /// The model's name in the Anthropic API. e.g. claude-3-5-sonnet-latest, claude-3-opus-20240229, etc
@@ -48,6 +52,7 @@ pub struct AnthropicAvailableModel {
     pub mode: Option<ModelMode>,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct AmazonBedrockSettingsContent {
     pub available_models: Option<Vec<BedrockAvailableModel>>,
@@ -57,6 +62,7 @@ pub struct AmazonBedrockSettingsContent {
     pub authentication_method: Option<BedrockAuthMethodContent>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct BedrockAvailableModel {
     pub name: String,
@@ -79,12 +85,14 @@ pub enum BedrockAuthMethodContent {
     Automatic,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct OllamaSettingsContent {
     pub api_url: Option<String>,
     pub available_models: Option<Vec<OllamaAvailableModel>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct OllamaAvailableModel {
     /// The model name in the Ollama API (e.g. "llama3.2:latest")
@@ -125,12 +133,14 @@ impl Default for KeepAlive {
     }
 }
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct LmStudioSettingsContent {
     pub api_url: Option<String>,
     pub available_models: Option<Vec<LmStudioAvailableModel>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct LmStudioAvailableModel {
     pub name: String,
@@ -140,12 +150,14 @@ pub struct LmStudioAvailableModel {
     pub supports_images: bool,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct DeepseekSettingsContent {
     pub api_url: Option<String>,
     pub available_models: Option<Vec<DeepseekAvailableModel>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct DeepseekAvailableModel {
     pub name: String,
@@ -154,12 +166,14 @@ pub struct DeepseekAvailableModel {
     pub max_output_tokens: Option<u64>,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct MistralSettingsContent {
     pub api_url: Option<String>,
     pub available_models: Option<Vec<MistralAvailableModel>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct MistralAvailableModel {
     pub name: String,
@@ -172,12 +186,14 @@ pub struct MistralAvailableModel {
     pub supports_thinking: Option<bool>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct OpenAiSettingsContent {
     pub api_url: Option<String>,
     pub available_models: Option<Vec<OpenAiAvailableModel>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct OpenAiAvailableModel {
     pub name: String,
@@ -197,12 +213,14 @@ pub enum OpenAiReasoningEffort {
     High,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct OpenAiCompatibleSettingsContent {
     pub api_url: String,
     pub available_models: Vec<OpenAiCompatibleAvailableModel>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct OpenAiCompatibleAvailableModel {
     pub name: String,
@@ -214,6 +232,7 @@ pub struct OpenAiCompatibleAvailableModel {
     pub capabilities: OpenAiCompatibleModelCapabilities,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct OpenAiCompatibleModelCapabilities {
     pub tools: bool,
@@ -233,12 +252,14 @@ impl Default for OpenAiCompatibleModelCapabilities {
     }
 }
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct VercelSettingsContent {
     pub api_url: Option<String>,
     pub available_models: Option<Vec<VercelAvailableModel>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct VercelAvailableModel {
     pub name: String,
@@ -248,12 +269,14 @@ pub struct VercelAvailableModel {
     pub max_completion_tokens: Option<u64>,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct GoogleSettingsContent {
     pub api_url: Option<String>,
     pub available_models: Option<Vec<GoogleAvailableModel>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct GoogleAvailableModel {
     pub name: String,
@@ -262,12 +285,14 @@ pub struct GoogleAvailableModel {
     pub mode: Option<ModelMode>,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct XAiSettingsContent {
     pub api_url: Option<String>,
     pub available_models: Option<Vec<XaiAvailableModel>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct XaiAvailableModel {
     pub name: String,
@@ -277,11 +302,13 @@ pub struct XaiAvailableModel {
     pub max_completion_tokens: Option<u64>,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct ZedDotDevSettingsContent {
     pub available_models: Option<Vec<ZedDotDevAvailableModel>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct ZedDotDevAvailableModel {
     /// The provider of the language model.
@@ -317,12 +344,14 @@ pub enum ZedDotDevAvailableProvider {
     Google,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
 pub struct OpenRouterSettingsContent {
     pub api_url: Option<String>,
     pub available_models: Option<Vec<OpenRouterAvailableModel>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct OpenRouterAvailableModel {
     pub name: String,
@@ -336,6 +365,7 @@ pub struct OpenRouterAvailableModel {
     pub provider: Option<OpenRouterProvider>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct OpenRouterProvider {
     #[serde(skip_serializing_if = "Option::is_none")]
@@ -374,6 +404,7 @@ fn default_true() -> bool {
 }
 
 /// Configuration for caching language model messages.
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct LanguageModelCacheConfiguration {
     pub max_cache_anchors: usize,

crates/settings/src/settings_content/project.rs 🔗

@@ -3,10 +3,12 @@ use std::{path::PathBuf, sync::Arc};
 use collections::{BTreeMap, HashMap};
 use schemars::JsonSchema;
 use serde::{Deserialize, Serialize};
+use serde_with::skip_serializing_none;
 use util::serde::default_true;
 
 use crate::{AllLanguageSettingsContent, SlashCommandSettings};
 
+#[skip_serializing_none]
 #[derive(Debug, PartialEq, Clone, Default, Serialize, Deserialize, JsonSchema)]
 pub struct ProjectSettingsContent {
     #[serde(flatten)]
@@ -44,6 +46,7 @@ pub struct ProjectSettingsContent {
     pub git_hosting_providers: Option<Vec<GitHostingProviderConfig>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct WorktreeSettingsContent {
     /// The displayed name of this project. If not set, the root directory name
@@ -81,6 +84,7 @@ pub struct WorktreeSettingsContent {
     pub private_files: Option<Vec<String>>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema, Hash)]
 #[serde(rename_all = "snake_case")]
 pub struct LspSettings {
@@ -107,6 +111,7 @@ impl Default for LspSettings {
     }
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq, JsonSchema, Hash)]
 pub struct BinarySettings {
     pub path: Option<String>,
@@ -115,6 +120,7 @@ pub struct BinarySettings {
     pub ignore_system_version: Option<bool>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq, JsonSchema, Hash)]
 pub struct FetchSettings {
     // Whether to consider pre-releases for fetching
@@ -122,6 +128,7 @@ pub struct FetchSettings {
 }
 
 /// Common language server settings.
+#[skip_serializing_none]
 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
 pub struct GlobalLspSettingsContent {
     /// Whether to show the LSP servers button in the status bar.
@@ -131,6 +138,7 @@ pub struct GlobalLspSettingsContent {
 }
 
 // todo! binary is actually just required, shouldn't be an option
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
 #[serde(rename_all = "snake_case")]
 pub struct DapSettings {
@@ -139,6 +147,7 @@ pub struct DapSettings {
     pub args: Vec<String>,
 }
 
+#[skip_serializing_none]
 #[derive(Default, Copy, Clone, PartialEq, Eq, Debug, Serialize, Deserialize, JsonSchema)]
 pub struct SessionSettingsContent {
     /// Whether or not to restore unsaved buffers on restart.
@@ -189,6 +198,7 @@ impl ContextServerSettingsContent {
     }
 }
 
+#[skip_serializing_none]
 #[derive(Deserialize, Serialize, Clone, PartialEq, Eq, JsonSchema)]
 pub struct ContextServerCommand {
     #[serde(rename = "command")]
@@ -224,6 +234,7 @@ impl std::fmt::Debug for ContextServerCommand {
     }
 }
 
+#[skip_serializing_none]
 #[derive(Copy, Clone, Debug, PartialEq, Default, Serialize, Deserialize, JsonSchema)]
 pub struct GitSettings {
     /// Whether or not to show the git gutter.
@@ -259,6 +270,7 @@ pub enum GitGutterSetting {
     Hide,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Copy, Debug, PartialEq, Default, Serialize, Deserialize, JsonSchema)]
 #[serde(rename_all = "snake_case")]
 pub struct InlineBlameSettings {
@@ -287,6 +299,7 @@ pub struct InlineBlameSettings {
     pub show_commit_summary: Option<bool>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Copy, PartialEq, Debug, Serialize, Deserialize, JsonSchema)]
 #[serde(rename_all = "snake_case")]
 pub struct BranchPickerSettingsContent {
@@ -306,6 +319,7 @@ pub enum GitHunkStyleSetting {
     UnstagedHollow,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
 pub struct DiagnosticsSettingsContent {
     /// Whether to show the project diagnostics button in the status bar.
@@ -321,6 +335,7 @@ pub struct DiagnosticsSettingsContent {
     pub inline: Option<InlineDiagnosticsSettingsContent>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Copy, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct LspPullDiagnosticsSettingsContent {
     /// Whether to pull for diagnostics or not.
@@ -334,6 +349,7 @@ pub struct LspPullDiagnosticsSettingsContent {
     pub debounce_ms: Option<u64>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize, JsonSchema, Eq)]
 pub struct InlineDiagnosticsSettingsContent {
     /// Whether or not to show inline diagnostics
@@ -360,6 +376,7 @@ pub struct InlineDiagnosticsSettingsContent {
     pub max_severity: Option<DiagnosticSeverityContent>,
 }
 
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
 pub struct NodeBinarySettings {
     /// The path to the Node binary.
@@ -395,6 +412,7 @@ pub enum DiagnosticSeverityContent {
 }
 
 /// A custom Git hosting provider.
+#[skip_serializing_none]
 #[derive(Debug, PartialEq, Clone, Serialize, Deserialize, JsonSchema)]
 pub struct GitHostingProviderConfig {
     /// The type of the provider.

crates/settings/src/settings_content/terminal.rs 🔗

@@ -4,9 +4,11 @@ use collections::HashMap;
 use gpui::{AbsoluteLength, FontFeatures, SharedString, px};
 use schemars::JsonSchema;
 use serde::{Deserialize, Serialize};
+use serde_with::skip_serializing_none;
 
 use crate::FontFamilyName;
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize, JsonSchema)]
 pub struct TerminalSettingsContent {
     /// What shell to use when opening a terminal.
@@ -160,6 +162,7 @@ pub enum WorkingDirectory {
     Always { directory: String },
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Copy, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct ScrollbarSettingsContent {
     /// When to show the scrollbar in the terminal.
@@ -243,6 +246,7 @@ pub enum AlternateScroll {
 }
 
 // Toolbar related settings
+#[skip_serializing_none]
 #[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct TerminalToolbarContent {
     /// Whether to display the terminal title in breadcrumbs inside the terminal pane.
@@ -269,7 +273,7 @@ pub enum VenvSettings {
         directories: Option<Vec<PathBuf>>,
     },
 }
-
+#[skip_serializing_none]
 pub struct VenvSettingsContent<'a> {
     pub activate_script: ActivateScript,
     pub venv_name: &'a str,

crates/settings/src/settings_content/theme.rs 🔗

@@ -6,7 +6,11 @@ use serde_json::Value;
 use serde_repr::{Deserialize_repr, Serialize_repr};
 use std::sync::Arc;
 
+use serde_with::skip_serializing_none;
+
 /// Settings for rendering text in UI and text buffers.
+
+#[skip_serializing_none]
 #[derive(Clone, PartialEq, Debug, Default, Serialize, Deserialize, JsonSchema)]
 pub struct ThemeSettingsContent {
     /// The default font size for text in the UI.
@@ -188,6 +192,7 @@ impl UiDensity {
 
 /// Newtype for font family name. Its `ParameterizedJsonSchema` lists the font families known at
 /// runtime.
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 #[serde(transparent)]
 pub struct FontFamilyName(pub Arc<str>);
@@ -220,6 +225,7 @@ where
 }
 
 /// The content of a serialized theme.
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema, PartialEq)]
 #[serde(default)]
 pub struct ThemeStyleContent {
@@ -254,16 +260,19 @@ pub struct PlayerColorContent {
 }
 
 /// Newtype for a theme name. Its `ParameterizedJsonSchema` lists the theme names known at runtime.
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 #[serde(transparent)]
 pub struct ThemeName(pub Arc<str>);
 
 /// Newtype for a icon theme name. Its `ParameterizedJsonSchema` lists the icon theme names known at
 /// runtime.
+#[skip_serializing_none]
 #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 #[serde(transparent)]
 pub struct IconThemeName(pub Arc<str>);
 
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema, PartialEq)]
 #[serde(default)]
 pub struct ThemeColorsContent {
@@ -768,6 +777,7 @@ pub struct ThemeColorsContent {
     pub version_control_conflict_theirs_background: Option<String>,
 }
 
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema, PartialEq)]
 #[serde(default)]
 pub struct HighlightStyleContent {
@@ -801,6 +811,7 @@ where
     Ok(T::deserialize(value).ok())
 }
 
+#[skip_serializing_none]
 #[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema, PartialEq)]
 #[serde(default)]
 pub struct StatusColorsContent {

crates/settings/src/settings_content/workspace.rs 🔗

@@ -3,9 +3,11 @@ use std::num::NonZeroUsize;
 use collections::HashMap;
 use schemars::JsonSchema;
 use serde::{Deserialize, Serialize};
+use serde_with::skip_serializing_none;
 
 use crate::{DockPosition, DockSide, ScrollbarSettingsContent, ShowIndentGuides};
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize, JsonSchema)]
 pub struct WorkspaceSettingsContent {
     /// Active pane styling settings.
@@ -105,6 +107,7 @@ pub struct WorkspaceSettingsContent {
     pub zoomed_padding: Option<bool>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct ItemSettingsContent {
     /// Whether to show the Git file status on a tab item.
@@ -134,6 +137,7 @@ pub struct ItemSettingsContent {
     pub show_close_button: Option<ShowCloseButton>,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, JsonSchema)]
 pub struct PreviewTabsSettingsContent {
     /// Whether to show opened editors as preview tabs.
@@ -186,6 +190,7 @@ pub enum ActivateOnClose {
     LeftNeighbour,
 }
 
+#[skip_serializing_none]
 #[derive(Copy, Clone, PartialEq, Debug, Default, Serialize, Deserialize, JsonSchema)]
 #[serde(rename_all = "snake_case")]
 pub struct ActivePanelModifiers {
@@ -252,6 +257,7 @@ pub enum RestoreOnStartupBehavior {
     LastSession,
 }
 
+#[skip_serializing_none]
 #[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, PartialEq)]
 pub struct TabBarSettingsContent {
     /// Whether or not to show the tab bar in the editor.
@@ -295,6 +301,7 @@ pub enum PaneSplitDirectionVertical {
     Right,
 }
 
+#[skip_serializing_none]
 #[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
 #[serde(rename_all = "snake_case")]
 pub struct CenteredLayoutSettings {
@@ -329,6 +336,7 @@ impl OnLastWindowClosed {
     }
 }
 
+#[skip_serializing_none]
 #[derive(Clone, PartialEq, Default, Serialize, Deserialize, JsonSchema, Debug)]
 pub struct ProjectPanelSettingsContent {
     /// Whether to show the project panel button in the status bar.
@@ -414,6 +422,7 @@ pub enum ProjectPanelEntrySpacing {
     Standard,
 }
 
+#[skip_serializing_none]
 #[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
 pub struct ProjectPanelIndentGuidesSettings {
     pub show: Option<ShowIndentGuides>,

crates/settings/src/settings_store.rs 🔗

@@ -1574,6 +1574,32 @@ mod tests {
         pretty_assertions::assert_eq!(new, expected);
     }
 
+    #[gpui::test]
+    fn test_update_git_settings(cx: &mut App) {
+        let store = SettingsStore::new(cx, &test_settings());
+
+        let actual = store.new_text_for_update("{}".to_string(), |current| {
+            current
+                .git
+                .get_or_insert_default()
+                .inline_blame
+                .get_or_insert_default()
+                .enabled = Some(true);
+        });
+        assert_eq!(
+            actual,
+            r#"{
+            "git": {
+                "inline_blame": {
+                    "enabled": true
+                }
+            }
+        }
+        "#
+            .unindent()
+        );
+    }
+
     #[gpui::test]
     fn test_global_settings(cx: &mut App) {
         let mut store = SettingsStore::new(cx, &test_settings());