mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
add ref postfix template
This commit is contained in:
parent
b85c189500
commit
434f1520df
2 changed files with 27 additions and 3 deletions
|
@ -30,6 +30,7 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) {
|
|||
if let Some(dot_receiver) = ctx.dot_receiver {
|
||||
let receiver_text = dot_receiver.syntax().text().to_string();
|
||||
postfix_snippet(ctx, "not", &format!("!{}", receiver_text)).add_to(acc);
|
||||
postfix_snippet(ctx, "ref", &format!("&{}", receiver_text)).add_to(acc);
|
||||
postfix_snippet(ctx, "if", &format!("if {} {{$0}}", receiver_text)).add_to(acc);
|
||||
postfix_snippet(
|
||||
ctx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue