diff options
author | Laurențiu Nicola <[email protected]> | 2019-02-12 08:33:23 +0000 |
---|---|---|
committer | Laurențiu Nicola <[email protected]> | 2019-02-12 10:51:01 +0000 |
commit | 7e8527f74831b37c5757ea6b25e40bcbb61bb6d4 (patch) | |
tree | e7bddef556f430d31903a54fced0df760673a0e8 /crates/ra_ide_api/src/completion/snapshots | |
parent | 37148000dcd43e5ccba4737a3e379f1ae6861893 (diff) |
Implement completion for associated items
Diffstat (limited to 'crates/ra_ide_api/src/completion/snapshots')
3 files changed, 86 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap new file mode 100644 index 000000000..ff1eef5f5 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap | |||
@@ -0,0 +1,28 @@ | |||
1 | --- | ||
2 | created: "2019-02-12T09:57:51.107816726Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | completion_kind: Reference, | ||
10 | label: "C", | ||
11 | kind: Some( | ||
12 | Const | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "const C: i32 = 42;" | ||
16 | ), | ||
17 | documentation: Some( | ||
18 | Documentation( | ||
19 | "An associated const" | ||
20 | ) | ||
21 | ), | ||
22 | lookup: None, | ||
23 | insert_text: None, | ||
24 | insert_text_format: PlainText, | ||
25 | source_range: [107; 107), | ||
26 | text_edit: None | ||
27 | } | ||
28 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap new file mode 100644 index 000000000..c53c61d0e --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap | |||
@@ -0,0 +1,30 @@ | |||
1 | --- | ||
2 | created: "2019-02-12T09:57:51.106389138Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | completion_kind: Reference, | ||
10 | label: "m", | ||
11 | kind: Some( | ||
12 | Method | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "fn m()" | ||
16 | ), | ||
17 | documentation: Some( | ||
18 | Documentation( | ||
19 | "An associated method" | ||
20 | ) | ||
21 | ), | ||
22 | lookup: None, | ||
23 | insert_text: Some( | ||
24 | "m()$0" | ||
25 | ), | ||
26 | insert_text_format: Snippet, | ||
27 | source_range: [100; 100), | ||
28 | text_edit: None | ||
29 | } | ||
30 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap new file mode 100644 index 000000000..e993fb1b0 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap | |||
@@ -0,0 +1,28 @@ | |||
1 | --- | ||
2 | created: "2019-02-12T09:33:54.719956203Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | ||
5 | expression: kind_completions | ||
6 | --- | ||
7 | [ | ||
8 | CompletionItem { | ||
9 | completion_kind: Reference, | ||
10 | label: "T", | ||
11 | kind: Some( | ||
12 | TypeAlias | ||
13 | ), | ||
14 | detail: Some( | ||
15 | "type T = i32;" | ||
16 | ), | ||
17 | documentation: Some( | ||
18 | Documentation( | ||
19 | "An associated type" | ||
20 | ) | ||
21 | ), | ||
22 | lookup: None, | ||
23 | insert_text: None, | ||
24 | insert_text_format: PlainText, | ||
25 | source_range: [101; 101), | ||
26 | text_edit: None | ||
27 | } | ||
28 | ] | ||