MergeBehavior -> ImportGranularity

This commit is contained in:
Lukas Tobias Wirth 2021-05-18 19:49:15 +02:00
parent e3d0d89d7e
commit 64f7072c25
8 changed files with 75 additions and 38 deletions

View file

@ -385,19 +385,21 @@
"markdownDescription": "Optional settings passed to the debug engine. Example: `{ \"lldb\": { \"terminal\":\"external\"} }`"
},
"$generated-start": false,
"rust-analyzer.assist.importMergeBehavior": {
"markdownDescription": "The strategy to use when inserting new imports or merging imports.",
"default": "crate",
"rust-analyzer.assist.importGranularity": {
"markdownDescription": "How imports should be grouped into use statements.",
"default": "preserve",
"type": "string",
"enum": [
"none",
"preserve",
"crate",
"module"
"module",
"item"
],
"enumDescriptions": [
"Do not merge imports at all.",
"Merge imports from the same crate into a single `use` statement.",
"Merge imports from the same module into a single `use` statement."
"Do not change the granularity of any imports and preserve the original structure written by the developer.",
"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."
]
},
"rust-analyzer.assist.importPrefix": {