diff options
Diffstat (limited to 'crates/ra_ide')
-rw-r--r-- | crates/ra_ide/src/completion/complete_postfix.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide/src/completion/complete_postfix.rs b/crates/ra_ide/src/completion/complete_postfix.rs index 59b58bf98..b878aeb0a 100644 --- a/crates/ra_ide/src/completion/complete_postfix.rs +++ b/crates/ra_ide/src/completion/complete_postfix.rs | |||
@@ -91,7 +91,7 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) { | |||
91 | &dot_receiver, | 91 | &dot_receiver, |
92 | "if", | 92 | "if", |
93 | "if expr {}", | 93 | "if expr {}", |
94 | &format!("if {} {{$0}}", receiver_text), | 94 | &format!("if {} {{\n $0\n}}", receiver_text), |
95 | ) | 95 | ) |
96 | .add_to(acc); | 96 | .add_to(acc); |
97 | postfix_snippet( | 97 | postfix_snippet( |
@@ -100,7 +100,7 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) { | |||
100 | &dot_receiver, | 100 | &dot_receiver, |
101 | "while", | 101 | "while", |
102 | "while expr {}", | 102 | "while expr {}", |
103 | &format!("while {} {{\n$0\n}}", receiver_text), | 103 | &format!("while {} {{\n $0\n}}", receiver_text), |
104 | ) | 104 | ) |
105 | .add_to(acc); | 105 | .add_to(acc); |
106 | } | 106 | } |
@@ -283,7 +283,7 @@ mod tests { | |||
283 | label: "if", | 283 | label: "if", |
284 | source_range: 89..89, | 284 | source_range: 89..89, |
285 | delete: 85..89, | 285 | delete: 85..89, |
286 | insert: "if bar {$0}", | 286 | insert: "if bar {\n $0\n}", |
287 | detail: "if expr {}", | 287 | detail: "if expr {}", |
288 | }, | 288 | }, |
289 | CompletionItem { | 289 | CompletionItem { |
@@ -318,7 +318,7 @@ mod tests { | |||
318 | label: "while", | 318 | label: "while", |
319 | source_range: 89..89, | 319 | source_range: 89..89, |
320 | delete: 85..89, | 320 | delete: 85..89, |
321 | insert: "while bar {\n$0\n}", | 321 | insert: "while bar {\n $0\n}", |
322 | detail: "while expr {}", | 322 | detail: "while expr {}", |
323 | }, | 323 | }, |
324 | ] | 324 | ] |