Add macro_rules item snippet

This commit is contained in:
memoryruins 2020-01-12 17:49:56 -05:00
parent a05970da46
commit 5575588387

View File

@ -36,6 +36,7 @@ fn ${1:feature}() {
.lookup_by("tfn")
.add_to(acc);
snippet(ctx, "macro_rules", "macro_rules! $1 {\n\t($2) => {\n\t\t$0\n\t};\n}").add_to(acc);
snippet(ctx, "pub(crate)", "pub(crate) $0").add_to(acc);
}
@ -106,6 +107,13 @@ mod tests {
kind: Snippet,
lookup: "tfn",
},
CompletionItem {
label: "macro_rules",
source_range: [78; 78),
delete: [78; 78),
insert: "macro_rules! $1 {\n\t($2) => {\n\t\t$0\n\t};\n}",
kind: Snippet,
},
CompletionItem {
label: "pub(crate)",
source_range: [78; 78),