mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Add dbgr postfix completion
This commit is contained in:
parent
3877421373
commit
eb0e710779
1 changed files with 12 additions and 0 deletions
|
@ -185,6 +185,16 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) {
|
||||||
)
|
)
|
||||||
.add_to(acc);
|
.add_to(acc);
|
||||||
|
|
||||||
|
postfix_snippet(
|
||||||
|
ctx,
|
||||||
|
cap,
|
||||||
|
&dot_receiver,
|
||||||
|
"dbgr",
|
||||||
|
"dbg!(&expr)",
|
||||||
|
&format!("dbg!(&{})", receiver_text),
|
||||||
|
)
|
||||||
|
.add_to(acc);
|
||||||
|
|
||||||
postfix_snippet(
|
postfix_snippet(
|
||||||
ctx,
|
ctx,
|
||||||
cap,
|
cap,
|
||||||
|
@ -263,6 +273,7 @@ fn main() {
|
||||||
sn box Box::new(expr)
|
sn box Box::new(expr)
|
||||||
sn call function(expr)
|
sn call function(expr)
|
||||||
sn dbg dbg!(expr)
|
sn dbg dbg!(expr)
|
||||||
|
sn dbgr dbg!(&expr)
|
||||||
sn if if expr {}
|
sn if if expr {}
|
||||||
sn match match expr {}
|
sn match match expr {}
|
||||||
sn not !expr
|
sn not !expr
|
||||||
|
@ -286,6 +297,7 @@ fn main() {
|
||||||
sn box Box::new(expr)
|
sn box Box::new(expr)
|
||||||
sn call function(expr)
|
sn call function(expr)
|
||||||
sn dbg dbg!(expr)
|
sn dbg dbg!(expr)
|
||||||
|
sn dbgr dbg!(&expr)
|
||||||
sn match match expr {}
|
sn match match expr {}
|
||||||
sn ref &expr
|
sn ref &expr
|
||||||
sn refm &mut expr
|
sn refm &mut expr
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue