mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-15 06:33: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::*;`.
|
/// Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
|
||||||
imports_merge_glob: bool = "true",
|
imports_merge_glob: bool = "true",
|
||||||
/// Prefer to unconditionally use imports of the core and alloc crate, over the std crate.
|
/// 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.
|
/// 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.
|
/// The path structure for newly inserted paths to use.
|
||||||
imports_prefix: ImportPrefixDef = "\"plain\"",
|
imports_prefix: ImportPrefixDef = "\"plain\"",
|
||||||
|
|
||||||
|
@ -1119,8 +1119,8 @@ impl Config {
|
||||||
ExprFillDefaultDef::Default => ExprFillDefaultMode::Default,
|
ExprFillDefaultDef::Default => ExprFillDefaultMode::Default,
|
||||||
},
|
},
|
||||||
insert_use: self.insert_use_config(),
|
insert_use: self.insert_use_config(),
|
||||||
prefer_no_std: self.data.imports_prefer_no_std,
|
prefer_no_std: self.data.imports_preferNoStd,
|
||||||
prefer_prelude: self.data.imports_prefer_prelude,
|
prefer_prelude: self.data.imports_preferPrelude,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1489,8 +1489,8 @@ impl Config {
|
||||||
CallableCompletionDef::None => None,
|
CallableCompletionDef::None => None,
|
||||||
},
|
},
|
||||||
insert_use: self.insert_use_config(),
|
insert_use: self.insert_use_config(),
|
||||||
prefer_no_std: self.data.imports_prefer_no_std,
|
prefer_no_std: self.data.imports_preferNoStd,
|
||||||
prefer_prelude: self.data.imports_prefer_prelude,
|
prefer_prelude: self.data.imports_preferPrelude,
|
||||||
snippet_cap: SnippetCap::new(try_or_def!(
|
snippet_cap: SnippetCap::new(try_or_def!(
|
||||||
self.caps
|
self.caps
|
||||||
.text_document
|
.text_document
|
||||||
|
@ -1519,8 +1519,8 @@ impl Config {
|
||||||
snippet_cap: SnippetCap::new(self.experimental("snippetTextEdit")),
|
snippet_cap: SnippetCap::new(self.experimental("snippetTextEdit")),
|
||||||
allowed: None,
|
allowed: None,
|
||||||
insert_use: self.insert_use_config(),
|
insert_use: self.insert_use_config(),
|
||||||
prefer_no_std: self.data.imports_prefer_no_std,
|
prefer_no_std: self.data.imports_preferNoStd,
|
||||||
prefer_prelude: self.data.imports_prefer_prelude,
|
prefer_prelude: self.data.imports_preferPrelude,
|
||||||
assist_emit_must_use: self.data.assist_emitMustUse,
|
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::*;`.
|
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.
|
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.
|
Whether to prefer import paths containing a `prelude` module.
|
||||||
|
|
|
@ -1129,12 +1129,12 @@
|
||||||
"default": true,
|
"default": true,
|
||||||
"type": "boolean"
|
"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.",
|
"markdownDescription": "Prefer to unconditionally use imports of the core and alloc crate, over the std crate.",
|
||||||
"default": false,
|
"default": false,
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"rust-analyzer.imports.prefer.prelude": {
|
"rust-analyzer.imports.preferPrelude": {
|
||||||
"markdownDescription": "Whether to prefer import paths containing a `prelude` module.",
|
"markdownDescription": "Whether to prefer import paths containing a `prelude` module.",
|
||||||
"default": false,
|
"default": false,
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
|
|
Loading…
Reference in a new issue