Skip to content

Commit 376edac

Browse files
authored
Merge pull request #19819 from Veykril/push-utvzwvwuuvlm
Change import prefix default to be by crate
2 parents 3d67336 + 687eeea commit 376edac

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ config_data! {
544544
/// Whether to prefer import paths containing a `prelude` module.
545545
imports_preferPrelude: bool = false,
546546
/// The path structure for newly inserted paths to use.
547-
imports_prefix: ImportPrefixDef = ImportPrefixDef::Plain,
547+
imports_prefix: ImportPrefixDef = ImportPrefixDef::ByCrate,
548548
/// Whether to prefix external (including std, core) crate imports with `::`. e.g. "use ::std::io::Read;".
549549
imports_prefixExternPrelude: bool = false,
550550
}

src/tools/rust-analyzer/docs/book/src/configuration_generated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ Whether to prefer import paths containing a `prelude` module.
835835

836836
## rust-analyzer.imports.prefix {#imports.prefix}
837837

838-
Default: `"plain"`
838+
Default: `"crate"`
839839

840840
The path structure for newly inserted paths to use.
841841

src/tools/rust-analyzer/editors/code/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1927,7 +1927,7 @@
19271927
"properties": {
19281928
"rust-analyzer.imports.prefix": {
19291929
"markdownDescription": "The path structure for newly inserted paths to use.",
1930-
"default": "plain",
1930+
"default": "crate",
19311931
"type": "string",
19321932
"enum": [
19331933
"plain",

0 commit comments

Comments
 (0)