mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 14:03:35 +00:00
Add macro_rules item snippet
This commit is contained in:
parent
a05970da46
commit
5575588387
1 changed files with 8 additions and 0 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue