Skip to content

Commit eb0e710

Browse files
committed
Add dbgr postfix completion
1 parent 3877421 commit eb0e710

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

crates/ide/src/completion/complete_postfix.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,16 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) {
185185
)
186186
.add_to(acc);
187187

188+
postfix_snippet(
189+
ctx,
190+
cap,
191+
&dot_receiver,
192+
"dbgr",
193+
"dbg!(&expr)",
194+
&format!("dbg!(&{})", receiver_text),
195+
)
196+
.add_to(acc);
197+
188198
postfix_snippet(
189199
ctx,
190200
cap,
@@ -263,6 +273,7 @@ fn main() {
263273
sn box Box::new(expr)
264274
sn call function(expr)
265275
sn dbg dbg!(expr)
276+
sn dbgr dbg!(&expr)
266277
sn if if expr {}
267278
sn match match expr {}
268279
sn not !expr
@@ -286,6 +297,7 @@ fn main() {
286297
sn box Box::new(expr)
287298
sn call function(expr)
288299
sn dbg dbg!(expr)
300+
sn dbgr dbg!(&expr)
289301
sn match match expr {}
290302
sn ref &expr
291303
sn refm &mut expr

0 commit comments

Comments
 (0)