diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 1b15d831df2d..e1e859b1b9a4 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -3566,23 +3566,13 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json }, "ImportGranularityDef" => set! { "type": "string", - "anyOf": [ - { - "enum": ["crate", "module", "item", "one"], - "enumDescriptions": [ - "Merge imports from the same crate into a single use statement. Conversely, imports from different crates are split into separate statements.", - "Merge imports from the same module into a single use statement. Conversely, imports from different modules are split into separate statements.", - "Flatten imports so that each has its own use statement.", - "Merge all imports into a single use statement as long as they have the same visibility and attributes." - ], - }, - { - "enum": ["preserve"], - "enumDescriptions": [ - "Deprecated - unless `enforceGranularity` is `true`, the style of the current file is preferred over this setting. Behaves like `item`.", - ], - "deprecated": true, - } + "enum": ["crate", "module", "item", "one", "preserve"], + "enumDescriptions": [ + "Merge imports from the same crate into a single use statement. Conversely, imports from different crates are split into separate statements.", + "Merge imports from the same module into a single use statement. Conversely, imports from different modules are split into separate statements.", + "Flatten imports so that each has its own use statement.", + "Merge all imports into a single use statement as long as they have the same visibility and attributes.", + "Deprecated - unless `enforceGranularity` is `true`, the style of the current file is preferred over this setting. Behaves like `item`." ], }, "ImportPrefixDef" => set! { diff --git a/editors/code/package.json b/editors/code/package.json index 4d1ae48c9dbf..decd80b8149f 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -2020,30 +2020,19 @@ "markdownDescription": "How imports should be grouped into use statements.", "default": "crate", "type": "string", - "anyOf": [ - { - "enum": [ - "crate", - "module", - "item", - "one" - ], - "enumDescriptions": [ - "Merge imports from the same crate into a single use statement. Conversely, imports from different crates are split into separate statements.", - "Merge imports from the same module into a single use statement. Conversely, imports from different modules are split into separate statements.", - "Flatten imports so that each has its own use statement.", - "Merge all imports into a single use statement as long as they have the same visibility and attributes." - ] - }, - { - "enum": [ - "preserve" - ], - "enumDescriptions": [ - "Deprecated - unless `enforceGranularity` is `true`, the style of the current file is preferred over this setting. Behaves like `item`." - ], - "deprecated": true - } + "enum": [ + "crate", + "module", + "item", + "one", + "preserve" + ], + "enumDescriptions": [ + "Merge imports from the same crate into a single use statement. Conversely, imports from different crates are split into separate statements.", + "Merge imports from the same module into a single use statement. Conversely, imports from different modules are split into separate statements.", + "Flatten imports so that each has its own use statement.", + "Merge all imports into a single use statement as long as they have the same visibility and attributes.", + "Deprecated - unless `enforceGranularity` is `true`, the style of the current file is preferred over this setting. Behaves like `item`." ] } }