mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-29 14:33:29 +00:00
Complete macros parenthesis
This commit is contained in:
parent
d614f463de
commit
037e02c08d
4 changed files with 9 additions and 9 deletions
|
@ -40,7 +40,7 @@ mod tests {
|
||||||
label: "foo",
|
label: "foo",
|
||||||
source_range: [46; 46),
|
source_range: [46; 46),
|
||||||
delete: [46; 46),
|
delete: [46; 46),
|
||||||
insert: "foo!",
|
insert: "foo!($0)",
|
||||||
kind: Macro,
|
kind: Macro,
|
||||||
detail: "macro_rules! foo",
|
detail: "macro_rules! foo",
|
||||||
},
|
},
|
||||||
|
|
|
@ -608,7 +608,7 @@ mod tests {
|
||||||
label: "foo",
|
label: "foo",
|
||||||
source_range: [179; 179),
|
source_range: [179; 179),
|
||||||
delete: [179; 179),
|
delete: [179; 179),
|
||||||
insert: "foo!",
|
insert: "foo!($0)",
|
||||||
kind: Macro,
|
kind: Macro,
|
||||||
detail: "#[macro_export]\nmacro_rules! foo",
|
detail: "#[macro_export]\nmacro_rules! foo",
|
||||||
},
|
},
|
||||||
|
|
|
@ -571,7 +571,7 @@ mod tests {
|
||||||
label: "bar",
|
label: "bar",
|
||||||
source_range: [252; 252),
|
source_range: [252; 252),
|
||||||
delete: [252; 252),
|
delete: [252; 252),
|
||||||
insert: "bar!",
|
insert: "bar!($0)",
|
||||||
kind: Macro,
|
kind: Macro,
|
||||||
detail: "macro_rules! bar",
|
detail: "macro_rules! bar",
|
||||||
},
|
},
|
||||||
|
@ -579,7 +579,7 @@ mod tests {
|
||||||
label: "baz",
|
label: "baz",
|
||||||
source_range: [252; 252),
|
source_range: [252; 252),
|
||||||
delete: [252; 252),
|
delete: [252; 252),
|
||||||
insert: "baz!",
|
insert: "baz!($0)",
|
||||||
kind: Macro,
|
kind: Macro,
|
||||||
detail: "#[macro_export]\nmacro_rules! baz",
|
detail: "#[macro_export]\nmacro_rules! baz",
|
||||||
},
|
},
|
||||||
|
@ -587,7 +587,7 @@ mod tests {
|
||||||
label: "foo",
|
label: "foo",
|
||||||
source_range: [252; 252),
|
source_range: [252; 252),
|
||||||
delete: [252; 252),
|
delete: [252; 252),
|
||||||
insert: "foo!",
|
insert: "foo!($0)",
|
||||||
kind: Macro,
|
kind: Macro,
|
||||||
detail: "macro_rules! foo",
|
detail: "macro_rules! foo",
|
||||||
},
|
},
|
||||||
|
@ -637,7 +637,7 @@ mod tests {
|
||||||
label: "foo",
|
label: "foo",
|
||||||
source_range: [49; 49),
|
source_range: [49; 49),
|
||||||
delete: [49; 49),
|
delete: [49; 49),
|
||||||
insert: "foo!",
|
insert: "foo!($0)",
|
||||||
kind: Macro,
|
kind: Macro,
|
||||||
detail: "macro_rules! foo",
|
detail: "macro_rules! foo",
|
||||||
},
|
},
|
||||||
|
@ -673,7 +673,7 @@ mod tests {
|
||||||
label: "foo",
|
label: "foo",
|
||||||
source_range: [57; 57),
|
source_range: [57; 57),
|
||||||
delete: [57; 57),
|
delete: [57; 57),
|
||||||
insert: "foo!",
|
insert: "foo!($0)",
|
||||||
kind: Macro,
|
kind: Macro,
|
||||||
detail: "macro_rules! foo",
|
detail: "macro_rules! foo",
|
||||||
},
|
},
|
||||||
|
@ -709,7 +709,7 @@ mod tests {
|
||||||
label: "foo",
|
label: "foo",
|
||||||
source_range: [50; 50),
|
source_range: [50; 50),
|
||||||
delete: [50; 50),
|
delete: [50; 50),
|
||||||
insert: "foo!",
|
insert: "foo!($0)",
|
||||||
kind: Macro,
|
kind: Macro,
|
||||||
detail: "macro_rules! foo",
|
detail: "macro_rules! foo",
|
||||||
},
|
},
|
||||||
|
|
|
@ -114,7 +114,7 @@ impl Completions {
|
||||||
.kind(CompletionItemKind::Macro)
|
.kind(CompletionItemKind::Macro)
|
||||||
.set_documentation(macro_.docs(ctx.db))
|
.set_documentation(macro_.docs(ctx.db))
|
||||||
.detail(detail)
|
.detail(detail)
|
||||||
.insert_snippet(format!("{}!", name));
|
.insert_snippet(format!("{}!($0)", name));
|
||||||
|
|
||||||
self.add(builder);
|
self.add(builder);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue