Fix import preference config keys

This commit is contained in:
Lukas Wirth 2023-11-12 17:48:40 +01:00
parent 92d9ca7d64
commit d6b908ec41
3 changed files with 12 additions and 12 deletions

View file

@ -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,
}
}