From eb0e710779eac63cc855ee054c73f87a8021154f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Tue, 22 Sep 2020 08:52:05 +0300 Subject: Add dbgr postfix completion --- crates/ide/src/completion/complete_postfix.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/ide/src/completion/complete_postfix.rs b/crates/ide/src/completion/complete_postfix.rs index 84c4e129d..29d38661b 100644 --- a/crates/ide/src/completion/complete_postfix.rs +++ b/crates/ide/src/completion/complete_postfix.rs @@ -185,6 +185,16 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) { ) .add_to(acc); + postfix_snippet( + ctx, + cap, + &dot_receiver, + "dbgr", + "dbg!(&expr)", + &format!("dbg!(&{})", receiver_text), + ) + .add_to(acc); + postfix_snippet( ctx, cap, @@ -263,6 +273,7 @@ fn main() { sn box Box::new(expr) sn call function(expr) sn dbg dbg!(expr) + sn dbgr dbg!(&expr) sn if if expr {} sn match match expr {} sn not !expr @@ -286,6 +297,7 @@ fn main() { sn box Box::new(expr) sn call function(expr) sn dbg dbg!(expr) + sn dbgr dbg!(&expr) sn match match expr {} sn ref &expr sn refm &mut expr -- cgit v1.2.3