Skip to content

Commit 520ff62

Browse files
committed
flip the default
1 parent d3d768d commit 520ff62

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

crates/ide/src/inlay_hints.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ mod tests {
540540
type_hints: true,
541541
parameter_hints: true,
542542
chaining_hints: true,
543-
hide_named_constructor_hints: true,
543+
hide_named_constructor_hints: false,
544544
max_length: None,
545545
};
546546

@@ -556,7 +556,7 @@ mod tests {
556556
parameter_hints: true,
557557
type_hints: false,
558558
chaining_hints: false,
559-
hide_named_constructor_hints: true,
559+
hide_named_constructor_hints: false,
560560
max_length: None,
561561
},
562562
ra_fixture,
@@ -570,7 +570,7 @@ mod tests {
570570
parameter_hints: false,
571571
type_hints: true,
572572
chaining_hints: false,
573-
hide_named_constructor_hints: true,
573+
hide_named_constructor_hints: false,
574574
max_length: None,
575575
},
576576
ra_fixture,
@@ -584,7 +584,7 @@ mod tests {
584584
parameter_hints: false,
585585
type_hints: false,
586586
chaining_hints: true,
587-
hide_named_constructor_hints: true,
587+
hide_named_constructor_hints: false,
588588
max_length: None,
589589
},
590590
ra_fixture,
@@ -615,7 +615,7 @@ mod tests {
615615
type_hints: false,
616616
parameter_hints: false,
617617
chaining_hints: false,
618-
hide_named_constructor_hints: true,
618+
hide_named_constructor_hints: false,
619619
max_length: None,
620620
},
621621
r#"
@@ -1321,7 +1321,14 @@ fn main() {
13211321

13221322
#[test]
13231323
fn skip_constructor_type_hints() {
1324-
check_types(
1324+
check_with_config(
1325+
InlayHintsConfig {
1326+
type_hints: true,
1327+
parameter_hints: true,
1328+
chaining_hints: true,
1329+
hide_named_constructor_hints: true,
1330+
max_length: None,
1331+
},
13251332
r#"
13261333
//- minicore: try
13271334
use core::ops::ControlFlow;
@@ -1363,14 +1370,7 @@ fn fallible() -> ControlFlow<()> {
13631370

13641371
#[test]
13651372
fn shows_constructor_type_hints_when_enabled() {
1366-
check_with_config(
1367-
InlayHintsConfig {
1368-
type_hints: true,
1369-
parameter_hints: true,
1370-
chaining_hints: true,
1371-
hide_named_constructor_hints: false,
1372-
max_length: None,
1373-
},
1373+
check_types(
13741374
r#"
13751375
//- minicore: try
13761376
use core::ops::ControlFlow;
@@ -1470,7 +1470,7 @@ fn main() {
14701470
parameter_hints: false,
14711471
type_hints: false,
14721472
chaining_hints: true,
1473-
hide_named_constructor_hints: true,
1473+
hide_named_constructor_hints: false,
14741474
max_length: None,
14751475
},
14761476
r#"
@@ -1527,7 +1527,7 @@ fn main() {
15271527
parameter_hints: false,
15281528
type_hints: false,
15291529
chaining_hints: true,
1530-
hide_named_constructor_hints: true,
1530+
hide_named_constructor_hints: false,
15311531
max_length: None,
15321532
},
15331533
r#"
@@ -1572,7 +1572,7 @@ fn main() {
15721572
parameter_hints: false,
15731573
type_hints: false,
15741574
chaining_hints: true,
1575-
hide_named_constructor_hints: true,
1575+
hide_named_constructor_hints: false,
15761576
max_length: None,
15771577
},
15781578
r#"
@@ -1618,7 +1618,7 @@ fn main() {
16181618
parameter_hints: false,
16191619
type_hints: false,
16201620
chaining_hints: true,
1621-
hide_named_constructor_hints: true,
1621+
hide_named_constructor_hints: false,
16221622
max_length: None,
16231623
},
16241624
r#"

crates/rust-analyzer/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ config_data! {
204204
/// Whether to show inlay type hints for variables.
205205
inlayHints_typeHints: bool = "true",
206206
/// Whether to hide inlay hints for constructors.
207-
inlayHints_hideNamedConstructorHints: bool = "true",
207+
inlayHints_hideNamedConstructorHints: bool = "false",
208208

209209
/// Join lines inserts else between consecutive ifs.
210210
joinLines_joinElseIf: bool = "true",

docs/user/generated_config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ site.
308308
--
309309
Whether to show inlay type hints for variables.
310310
--
311-
[[rust-analyzer.inlayHints.hideNamedConstructorHints]]rust-analyzer.inlayHints.hideNamedConstructorHints (default: `true`)::
311+
[[rust-analyzer.inlayHints.hideNamedConstructorHints]]rust-analyzer.inlayHints.hideNamedConstructorHints (default: `false`)::
312312
+
313313
--
314314
Whether to hide inlay hints for constructors.

editors/code/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@
754754
},
755755
"rust-analyzer.inlayHints.hideNamedConstructorHints": {
756756
"markdownDescription": "Whether to hide inlay hints for constructors.",
757-
"default": true,
757+
"default": false,
758758
"type": "boolean"
759759
},
760760
"rust-analyzer.joinLines.joinElseIf": {

0 commit comments

Comments
 (0)