flip the default

This commit is contained in:
Jake Heinz
2021-11-13 23:39:34 +00:00
parent d3d768de0d
commit 520ff62f4e
4 changed files with 21 additions and 21 deletions
+18 -18
View File
@@ -540,7 +540,7 @@ mod tests {
type_hints: true,
parameter_hints: true,
chaining_hints: true,
hide_named_constructor_hints: true,
hide_named_constructor_hints: false,
max_length: None,
};
@@ -556,7 +556,7 @@ fn check_params(ra_fixture: &str) {
parameter_hints: true,
type_hints: false,
chaining_hints: false,
hide_named_constructor_hints: true,
hide_named_constructor_hints: false,
max_length: None,
},
ra_fixture,
@@ -570,7 +570,7 @@ fn check_types(ra_fixture: &str) {
parameter_hints: false,
type_hints: true,
chaining_hints: false,
hide_named_constructor_hints: true,
hide_named_constructor_hints: false,
max_length: None,
},
ra_fixture,
@@ -584,7 +584,7 @@ fn check_chains(ra_fixture: &str) {
parameter_hints: false,
type_hints: false,
chaining_hints: true,
hide_named_constructor_hints: true,
hide_named_constructor_hints: false,
max_length: None,
},
ra_fixture,
@@ -615,7 +615,7 @@ fn hints_disabled() {
type_hints: false,
parameter_hints: false,
chaining_hints: false,
hide_named_constructor_hints: true,
hide_named_constructor_hints: false,
max_length: None,
},
r#"
@@ -1321,7 +1321,14 @@ fn generic<T: Clone>(t: T) {
#[test]
fn skip_constructor_type_hints() {
check_types(
check_with_config(
InlayHintsConfig {
type_hints: true,
parameter_hints: true,
chaining_hints: true,
hide_named_constructor_hints: true,
max_length: None,
},
r#"
//- minicore: try
use core::ops::ControlFlow;
@@ -1363,14 +1370,7 @@ fn fallible() -> ControlFlow<()> {
#[test]
fn shows_constructor_type_hints_when_enabled() {
check_with_config(
InlayHintsConfig {
type_hints: true,
parameter_hints: true,
chaining_hints: true,
hide_named_constructor_hints: false,
max_length: None,
},
check_types(
r#"
//- minicore: try
use core::ops::ControlFlow;
@@ -1470,7 +1470,7 @@ fn chaining_hints_ignore_comments() {
parameter_hints: false,
type_hints: false,
chaining_hints: true,
hide_named_constructor_hints: true,
hide_named_constructor_hints: false,
max_length: None,
},
r#"
@@ -1527,7 +1527,7 @@ fn struct_access_chaining_hints() {
parameter_hints: false,
type_hints: false,
chaining_hints: true,
hide_named_constructor_hints: true,
hide_named_constructor_hints: false,
max_length: None,
},
r#"
@@ -1572,7 +1572,7 @@ fn generic_chaining_hints() {
parameter_hints: false,
type_hints: false,
chaining_hints: true,
hide_named_constructor_hints: true,
hide_named_constructor_hints: false,
max_length: None,
},
r#"
@@ -1618,7 +1618,7 @@ fn shorten_iterator_chaining_hints() {
parameter_hints: false,
type_hints: false,
chaining_hints: true,
hide_named_constructor_hints: true,
hide_named_constructor_hints: false,
max_length: None,
},
r#"
+1 -1
View File
@@ -204,7 +204,7 @@ struct ConfigData {
/// Whether to show inlay type hints for variables.
inlayHints_typeHints: bool = "true",
/// Whether to hide inlay hints for constructors.
inlayHints_hideNamedConstructorHints: bool = "true",
inlayHints_hideNamedConstructorHints: bool = "false",
/// Join lines inserts else between consecutive ifs.
joinLines_joinElseIf: bool = "true",
+1 -1
View File
@@ -308,7 +308,7 @@ site.
--
Whether to show inlay type hints for variables.
--
[[rust-analyzer.inlayHints.hideNamedConstructorHints]]rust-analyzer.inlayHints.hideNamedConstructorHints (default: `true`)::
[[rust-analyzer.inlayHints.hideNamedConstructorHints]]rust-analyzer.inlayHints.hideNamedConstructorHints (default: `false`)::
+
--
Whether to hide inlay hints for constructors.
+1 -1
View File
@@ -754,7 +754,7 @@
},
"rust-analyzer.inlayHints.hideNamedConstructorHints": {
"markdownDescription": "Whether to hide inlay hints for constructors.",
"default": true,
"default": false,
"type": "boolean"
},
"rust-analyzer.joinLines.joinElseIf": {