Add macro_rules item snippet
This commit is contained in:
@@ -36,6 +36,7 @@ fn ${1:feature}() {
|
|||||||
.lookup_by("tfn")
|
.lookup_by("tfn")
|
||||||
.add_to(acc);
|
.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);
|
snippet(ctx, "pub(crate)", "pub(crate) $0").add_to(acc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,6 +107,13 @@ mod tests {
|
|||||||
kind: Snippet,
|
kind: Snippet,
|
||||||
lookup: "tfn",
|
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 {
|
CompletionItem {
|
||||||
label: "pub(crate)",
|
label: "pub(crate)",
|
||||||
source_range: [78; 78),
|
source_range: [78; 78),
|
||||||
|
|||||||
Reference in New Issue
Block a user