From b4fe479236f592fcbfa1422dda54253b77d8b0e1 Mon Sep 17 00:00:00 2001 From: Lukas Tobias Wirth Date: Tue, 18 May 2021 20:21:47 +0200 Subject: Replace ImportGranularity::Guess with guessing boolean flag --- editors/code/package.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'editors') diff --git a/editors/code/package.json b/editors/code/package.json index 06ce86987..48d12b35a 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -387,23 +387,26 @@ "$generated-start": false, "rust-analyzer.assist.importGranularity": { "markdownDescription": "How imports should be grouped into use statements.", - "default": "guess", + "default": "crate", "type": "string", "enum": [ - "guess", "preserve", "crate", "module", "item" ], "enumDescriptions": [ - "Try to guess the granularity of imports on a per module basis by observing the existing imports.", "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.importEnforceGranularity": { + "markdownDescription": "Whether to enforce the import granularity setting for all files. If set to false rust-analyzer will try to keep import styles consistent per file.", + "default": false, + "type": "boolean" + }, "rust-analyzer.assist.importPrefix": { "markdownDescription": "The path structure for newly inserted paths to use.", "default": "plain", -- cgit v1.2.3