Merge pull request #19819 from Veykril/push-utvzwvwuuvlm

Change import prefix default to be by crate
This commit is contained in:
Lukas Wirth 2025-05-26 08:28:16 +00:00 committed by GitHub
commit acab393c4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -544,7 +544,7 @@ config_data! {
/// Whether to prefer import paths containing a `prelude` module.
imports_preferPrelude: bool = false,
/// The path structure for newly inserted paths to use.
imports_prefix: ImportPrefixDef = ImportPrefixDef::Plain,
imports_prefix: ImportPrefixDef = ImportPrefixDef::ByCrate,
/// Whether to prefix external (including std, core) crate imports with `::`. e.g. "use ::std::io::Read;".
imports_prefixExternPrelude: bool = false,
}

View file

@ -835,7 +835,7 @@ Whether to prefer import paths containing a `prelude` module.
## rust-analyzer.imports.prefix {#imports.prefix}
Default: `"plain"`
Default: `"crate"`
The path structure for newly inserted paths to use.

View file

@ -1927,7 +1927,7 @@
"properties": {
"rust-analyzer.imports.prefix": {
"markdownDescription": "The path structure for newly inserted paths to use.",
"default": "plain",
"default": "crate",
"type": "string",
"enum": [
"plain",