diff options
Diffstat (limited to 'crates/ra_ide/src/completion')
-rw-r--r-- | crates/ra_ide/src/completion/complete_snippet.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/ra_ide/src/completion/complete_snippet.rs b/crates/ra_ide/src/completion/complete_snippet.rs index 1f2988b36..731b4fd82 100644 --- a/crates/ra_ide/src/completion/complete_snippet.rs +++ b/crates/ra_ide/src/completion/complete_snippet.rs | |||
@@ -36,6 +36,7 @@ fn ${1:feature}() { | |||
36 | .lookup_by("tfn") | 36 | .lookup_by("tfn") |
37 | .add_to(acc); | 37 | .add_to(acc); |
38 | 38 | ||
39 | snippet(ctx, "macro_rules", "macro_rules! $1 {\n\t($2) => {\n\t\t$0\n\t};\n}").add_to(acc); | ||
39 | snippet(ctx, "pub(crate)", "pub(crate) $0").add_to(acc); | 40 | snippet(ctx, "pub(crate)", "pub(crate) $0").add_to(acc); |
40 | } | 41 | } |
41 | 42 | ||
@@ -107,6 +108,13 @@ mod tests { | |||
107 | lookup: "tfn", | 108 | lookup: "tfn", |
108 | }, | 109 | }, |
109 | CompletionItem { | 110 | CompletionItem { |
111 | label: "macro_rules", | ||
112 | source_range: [78; 78), | ||
113 | delete: [78; 78), | ||
114 | insert: "macro_rules! $1 {\n\t($2) => {\n\t\t$0\n\t};\n}", | ||
115 | kind: Snippet, | ||
116 | }, | ||
117 | CompletionItem { | ||
110 | label: "pub(crate)", | 118 | label: "pub(crate)", |
111 | source_range: [78; 78), | 119 | source_range: [78; 78), |
112 | delete: [78; 78), | 120 | delete: [78; 78), |