mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +00:00
Auto merge of #15882 - Veykril:fix-config-keys, r=Veykril
minor: Fix import preference config keys
This commit is contained in:
commit
4fc208e693
3 changed files with 12 additions and 12 deletions
|
@ -352,9 +352,9 @@ config_data! {
|
|||
/// Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
|
||||
imports_merge_glob: bool = "true",
|
||||
/// Prefer to unconditionally use imports of the core and alloc crate, over the std crate.
|
||||
imports_prefer_no_std: bool = "false",
|
||||
imports_preferNoStd | imports_prefer_no_std: bool = "false",
|
||||
/// Whether to prefer import paths containing a `prelude` module.
|
||||
imports_prefer_prelude: bool = "false",
|
||||
imports_preferPrelude: bool = "false",
|
||||
/// The path structure for newly inserted paths to use.
|
||||
imports_prefix: ImportPrefixDef = "\"plain\"",
|
||||
|
||||
|
@ -1119,8 +1119,8 @@ impl Config {
|
|||
ExprFillDefaultDef::Default => ExprFillDefaultMode::Default,
|
||||
},
|
||||
insert_use: self.insert_use_config(),
|
||||
prefer_no_std: self.data.imports_prefer_no_std,
|
||||
prefer_prelude: self.data.imports_prefer_prelude,
|
||||
prefer_no_std: self.data.imports_preferNoStd,
|
||||
prefer_prelude: self.data.imports_preferPrelude,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1489,8 +1489,8 @@ impl Config {
|
|||
CallableCompletionDef::None => None,
|
||||
},
|
||||
insert_use: self.insert_use_config(),
|
||||
prefer_no_std: self.data.imports_prefer_no_std,
|
||||
prefer_prelude: self.data.imports_prefer_prelude,
|
||||
prefer_no_std: self.data.imports_preferNoStd,
|
||||
prefer_prelude: self.data.imports_preferPrelude,
|
||||
snippet_cap: SnippetCap::new(try_or_def!(
|
||||
self.caps
|
||||
.text_document
|
||||
|
@ -1519,8 +1519,8 @@ impl Config {
|
|||
snippet_cap: SnippetCap::new(self.experimental("snippetTextEdit")),
|
||||
allowed: None,
|
||||
insert_use: self.insert_use_config(),
|
||||
prefer_no_std: self.data.imports_prefer_no_std,
|
||||
prefer_prelude: self.data.imports_prefer_prelude,
|
||||
prefer_no_std: self.data.imports_preferNoStd,
|
||||
prefer_prelude: self.data.imports_preferPrelude,
|
||||
assist_emit_must_use: self.data.assist_emitMustUse,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -493,12 +493,12 @@ Group inserted imports by the https://rust-analyzer.github.io/manual.html#auto-i
|
|||
--
|
||||
Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
|
||||
--
|
||||
[[rust-analyzer.imports.prefer.no.std]]rust-analyzer.imports.prefer.no.std (default: `false`)::
|
||||
[[rust-analyzer.imports.preferNoStd]]rust-analyzer.imports.preferNoStd (default: `false`)::
|
||||
+
|
||||
--
|
||||
Prefer to unconditionally use imports of the core and alloc crate, over the std crate.
|
||||
--
|
||||
[[rust-analyzer.imports.prefer.prelude]]rust-analyzer.imports.prefer.prelude (default: `false`)::
|
||||
[[rust-analyzer.imports.preferPrelude]]rust-analyzer.imports.preferPrelude (default: `false`)::
|
||||
+
|
||||
--
|
||||
Whether to prefer import paths containing a `prelude` module.
|
||||
|
|
|
@ -1129,12 +1129,12 @@
|
|||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"rust-analyzer.imports.prefer.no.std": {
|
||||
"rust-analyzer.imports.preferNoStd": {
|
||||
"markdownDescription": "Prefer to unconditionally use imports of the core and alloc crate, over the std crate.",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"rust-analyzer.imports.prefer.prelude": {
|
||||
"rust-analyzer.imports.preferPrelude": {
|
||||
"markdownDescription": "Whether to prefer import paths containing a `prelude` module.",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
|
|
Loading…
Reference in a new issue