mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2026-05-02 23:25:50 +00:00
Merge pull request #21147 from Wilfred/imports_granularity_dropdown
fix: rust-analyzer.imports.granularity.group should get a dropdown UI
This commit is contained in:
@@ -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! {
|
||||
|
||||
@@ -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`."
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user