mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
add function to completion ctx
This commit is contained in:
parent
7a1ed6400d
commit
e4de2c8d7f
6 changed files with 19 additions and 21 deletions
|
@ -7,7 +7,7 @@ fn snippet(label: &str, snippet: &str) -> Builder {
|
|||
}
|
||||
|
||||
pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) {
|
||||
if !(ctx.is_trivial_path && ctx.enclosing_fn.is_some()) {
|
||||
if !(ctx.is_trivial_path && ctx.function_syntax.is_some()) {
|
||||
return;
|
||||
}
|
||||
snippet("pd", "eprintln!(\"$0 = {:?}\", $0);").add_to(acc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue