diff --git a/crates/ty_ide/src/completion.rs b/crates/ty_ide/src/completion.rs index a33f7600eb..0408d972be 100644 --- a/crates/ty_ide/src/completion.rs +++ b/crates/ty_ide/src/completion.rs @@ -2558,9 +2558,7 @@ def frob(): ... assert_snapshot!( builder.skip_keywords().skip_builtins().build().snapshot(), - @r" - foo - ", + @"foo=", ); } @@ -2574,9 +2572,7 @@ def frob(): ... assert_snapshot!( builder.skip_keywords().skip_builtins().build().snapshot(), - @r" - foo - ", + @"foo=", ); } @@ -3233,7 +3229,7 @@ bar(o builder.skip_keywords().skip_builtins().skip_auto_import().build().snapshot(), @r" foo - okay + okay= " ); } @@ -3254,7 +3250,7 @@ bar(o builder.skip_keywords().skip_builtins().skip_auto_import().build().snapshot(), @r" foo - okay + okay= " ); } @@ -3272,9 +3268,9 @@ foo(b assert_snapshot!( builder.skip_keywords().skip_builtins().skip_auto_import().build().snapshot(), @r" - bar - barbaz - baz + bar= + barbaz= + baz= " ); } @@ -3291,9 +3287,7 @@ foo(bar=1, b assert_snapshot!( builder.skip_keywords().skip_builtins().skip_auto_import().build().snapshot(), - @r" - baz - " + @"baz=" ); } @@ -3311,9 +3305,7 @@ abc(o assert_snapshot!( builder.skip_keywords().skip_builtins().skip_auto_import().build().snapshot(), - @r" - okay - " + @"okay=" ); } @@ -3329,9 +3321,7 @@ abc(okay=1, ba baz=5 assert_snapshot!( builder.skip_keywords().skip_builtins().skip_auto_import().build().snapshot(), - @r" - bar - " + @"bar=" ); } @@ -3375,9 +3365,9 @@ bar(o builder.skip_keywords().skip_builtins().skip_auto_import().build().snapshot(), @r" foo - okay - okay_abc - okay_okay + okay= + okay_abc= + okay_okay= " ); } @@ -3397,7 +3387,7 @@ bar( assert_snapshot!(builder.skip_keywords().skip_builtins().build().snapshot(), @r" bar foo - okay + okay= "); } @@ -6793,7 +6783,7 @@ def f(zqzqzq: str): self.filtered .iter() .map(|c| { - let mut snapshot = c.name.as_str().to_string(); + let mut snapshot = c.insert.as_deref().unwrap_or(c.name.as_str()).to_string(); if self.type_signatures { let ty = c.ty.map(|ty| ty.display(self.db).to_string())