aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_assists/src/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_assists/src/handlers')
-rw-r--r--crates/ide_assists/src/handlers/auto_import.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/crates/ide_assists/src/handlers/auto_import.rs b/crates/ide_assists/src/handlers/auto_import.rs
index dda5a6631..d4748ef3a 100644
--- a/crates/ide_assists/src/handlers/auto_import.rs
+++ b/crates/ide_assists/src/handlers/auto_import.rs
@@ -33,20 +33,19 @@ use crate::{AssistContext, AssistId, AssistKind, Assists, GroupLabel};
33// use super::AssistContext; 33// use super::AssistContext;
34// ``` 34// ```
35// 35//
36// .Merge Behavior 36// .Import Granularity
37// 37//
38// It is possible to configure how use-trees are merged with the `importMergeBehavior` setting. 38// It is possible to configure how use-trees are merged with the `importGranularity` setting.
39// It has the following configurations: 39// It has the following configurations:
40// 40//
41// - `full`: This setting will cause auto-import to always completely merge use-trees that share the 41// - `crate`: Merge imports from the same crate into a single use statement. This kind of
42// same path prefix while also merging inner trees that share the same path-prefix. This kind of
43// nesting is only supported in Rust versions later than 1.24. 42// nesting is only supported in Rust versions later than 1.24.
44// - `last`: This setting will cause auto-import to merge use-trees as long as the resulting tree 43// - `module`: Merge imports from the same module into a single use statement.
45// will only contain a nesting of single segment paths at the very end. 44// - `item`: Don't merge imports at all, creating one import per item.
46// - `none`: This setting will cause auto-import to never merge use-trees keeping them as simple 45// - `preserve`: Do not change the granularity of any imports. For auto-import this has the same
47// paths. 46// effect as `item`.
48// 47//
49// In `VS Code` the configuration for this is `rust-analyzer.assist.importMergeBehavior`. 48// In `VS Code` the configuration for this is `rust-analyzer.assist.importGranularity`.
50// 49//
51// .Import Prefix 50// .Import Prefix
52// 51//