Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 7 additions & 17 deletions crates/rust-analyzer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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! {
Expand Down
37 changes: 13 additions & 24 deletions editors/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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`."
]
}
}
Expand Down