diff options
author | Lukas Wirth <[email protected]> | 2021-06-18 22:11:56 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-06-18 22:11:56 +0100 |
commit | 2ee090faaf69474a2baadf0494ef3c6ed4fdbcbc (patch) | |
tree | e67e1f3404fefb2dc3999b94f86bc9cbcca33dd1 /crates/rust-analyzer/src/config.rs | |
parent | 84507a0b9c2e8f6e632ad9ec649cd1f21a7e0887 (diff) |
Allow to disable import insertion on single path glob imports
Diffstat (limited to 'crates/rust-analyzer/src/config.rs')
-rw-r--r-- | crates/rust-analyzer/src/config.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index c4757a1cb..16c295639 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs | |||
@@ -44,6 +44,9 @@ config_data! { | |||
44 | assist_importPrefix: ImportPrefixDef = "\"plain\"", | 44 | assist_importPrefix: ImportPrefixDef = "\"plain\"", |
45 | /// Group inserted imports by the [following order](https://rust-analyzer.github.io/manual.html#auto-import). Groups are separated by newlines. | 45 | /// Group inserted imports by the [following order](https://rust-analyzer.github.io/manual.html#auto-import). Groups are separated by newlines. |
46 | assist_importGroup: bool = "true", | 46 | assist_importGroup: bool = "true", |
47 | /// Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`. | ||
48 | assist_allowMergingIntoGlobImports: bool = "true", | ||
49 | |||
47 | /// Show function name and docs in parameter hints. | 50 | /// Show function name and docs in parameter hints. |
48 | callInfo_full: bool = "true", | 51 | callInfo_full: bool = "true", |
49 | 52 | ||
@@ -672,6 +675,7 @@ impl Config { | |||
672 | ImportPrefixDef::BySelf => PrefixKind::BySelf, | 675 | ImportPrefixDef::BySelf => PrefixKind::BySelf, |
673 | }, | 676 | }, |
674 | group: self.data.assist_importGroup, | 677 | group: self.data.assist_importGroup, |
678 | skip_glob_imports: !self.data.assist_allowMergingIntoGlobImports, | ||
675 | } | 679 | } |
676 | } | 680 | } |
677 | pub fn completion(&self) -> CompletionConfig { | 681 | pub fn completion(&self) -> CompletionConfig { |