mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-29 05:14:18 +00:00
Auto merge of #14149 - Veykril:completion, r=Veykril
Trigger call info for more completions of signature having things
This commit is contained in:
commit
523fea8f25
3 changed files with 8 additions and 2 deletions
|
@ -587,6 +587,7 @@ fn main() { Foo::Fo$0 }
|
||||||
),
|
),
|
||||||
lookup: "Foo{}",
|
lookup: "Foo{}",
|
||||||
detail: "Foo { x: i32, y: i32 }",
|
detail: "Foo { x: i32, y: i32 }",
|
||||||
|
trigger_call_info: true,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
"#]],
|
"#]],
|
||||||
|
@ -614,6 +615,7 @@ fn main() { Foo::Fo$0 }
|
||||||
),
|
),
|
||||||
lookup: "Foo()",
|
lookup: "Foo()",
|
||||||
detail: "Foo(i32, i32)",
|
detail: "Foo(i32, i32)",
|
||||||
|
trigger_call_info: true,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
"#]],
|
"#]],
|
||||||
|
@ -679,6 +681,7 @@ fn main() { Foo::Fo$0 }
|
||||||
Variant,
|
Variant,
|
||||||
),
|
),
|
||||||
detail: "Foo",
|
detail: "Foo",
|
||||||
|
trigger_call_info: true,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
"#]],
|
"#]],
|
||||||
|
@ -745,6 +748,7 @@ fn main() { let _: m::Spam = S$0 }
|
||||||
postfix_match: None,
|
postfix_match: None,
|
||||||
is_definite: false,
|
is_definite: false,
|
||||||
},
|
},
|
||||||
|
trigger_call_info: true,
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
label: "m::Spam::Foo",
|
label: "m::Spam::Foo",
|
||||||
|
@ -770,6 +774,7 @@ fn main() { let _: m::Spam = S$0 }
|
||||||
postfix_match: None,
|
postfix_match: None,
|
||||||
is_definite: false,
|
is_definite: false,
|
||||||
},
|
},
|
||||||
|
trigger_call_info: true,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
"#]],
|
"#]],
|
||||||
|
@ -942,6 +947,7 @@ use self::E::*;
|
||||||
documentation: Documentation(
|
documentation: Documentation(
|
||||||
"variant docs",
|
"variant docs",
|
||||||
),
|
),
|
||||||
|
trigger_call_info: true,
|
||||||
},
|
},
|
||||||
CompletionItem {
|
CompletionItem {
|
||||||
label: "E",
|
label: "E",
|
||||||
|
|
|
@ -113,7 +113,7 @@ fn render(
|
||||||
item.detail(rendered.detail);
|
item.detail(rendered.detail);
|
||||||
|
|
||||||
match snippet_cap {
|
match snippet_cap {
|
||||||
Some(snippet_cap) => item.insert_snippet(snippet_cap, rendered.literal),
|
Some(snippet_cap) => item.insert_snippet(snippet_cap, rendered.literal).trigger_call_info(),
|
||||||
None => item.insert_text(rendered.literal),
|
None => item.insert_text(rendered.literal),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ pub(crate) fn render_union_literal(
|
||||||
.set_relevance(ctx.completion_relevance());
|
.set_relevance(ctx.completion_relevance());
|
||||||
|
|
||||||
match ctx.snippet_cap() {
|
match ctx.snippet_cap() {
|
||||||
Some(snippet_cap) => item.insert_snippet(snippet_cap, literal),
|
Some(snippet_cap) => item.insert_snippet(snippet_cap, literal).trigger_call_info(),
|
||||||
None => item.insert_text(literal),
|
None => item.insert_text(literal),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue