diff options
author | gfreezy <[email protected]> | 2019-01-19 14:02:50 +0000 |
---|---|---|
committer | gfreezy <[email protected]> | 2019-01-19 14:02:50 +0000 |
commit | d08e81cdd818dd3378c292767e15a38e6bbc6f6c (patch) | |
tree | e07b3363f21912ca7aaca4ae1dce482c0bcd6f85 /crates/ra_ide_api/src/completion/snapshots | |
parent | fa43ef30f4f96fc8e4ea1f9c4492bcb07b3335ca (diff) |
refactor completions to use TextEdit instead of InsertText
Diffstat (limited to 'crates/ra_ide_api/src/completion/snapshots')
42 files changed, 2052 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap new file mode 100644 index 000000000..40a5fd90f --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap | |||
@@ -0,0 +1,35 @@ | |||
1 | Created: 2019-01-19T13:42:17.835266+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "x", | ||
9 | kind: Some( | ||
10 | Binding | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | }, | ||
18 | CompletionItem { | ||
19 | completion_kind: Reference, | ||
20 | label: "quux", | ||
21 | kind: Some( | ||
22 | Function | ||
23 | ), | ||
24 | detail: None, | ||
25 | lookup: None, | ||
26 | insert_text_format: Snippet, | ||
27 | text_edit: Some( | ||
28 | AtomTextEdit { | ||
29 | delete: [62; 100), | ||
30 | insert: "quux()$0" | ||
31 | } | ||
32 | ), | ||
33 | additional_text_edits: None | ||
34 | } | ||
35 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap new file mode 100644 index 000000000..f6c0d7501 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap | |||
@@ -0,0 +1,47 @@ | |||
1 | Created: 2019-01-19T13:42:17.835796+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "b", | ||
9 | kind: Some( | ||
10 | Binding | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | }, | ||
18 | CompletionItem { | ||
19 | completion_kind: Reference, | ||
20 | label: "a", | ||
21 | kind: Some( | ||
22 | Binding | ||
23 | ), | ||
24 | detail: None, | ||
25 | lookup: None, | ||
26 | insert_text_format: PlainText, | ||
27 | text_edit: None, | ||
28 | additional_text_edits: None | ||
29 | }, | ||
30 | CompletionItem { | ||
31 | completion_kind: Reference, | ||
32 | label: "quux", | ||
33 | kind: Some( | ||
34 | Function | ||
35 | ), | ||
36 | detail: None, | ||
37 | lookup: None, | ||
38 | insert_text_format: Snippet, | ||
39 | text_edit: Some( | ||
40 | AtomTextEdit { | ||
41 | delete: [213; 231), | ||
42 | insert: "quux()$0" | ||
43 | } | ||
44 | ), | ||
45 | additional_text_edits: None | ||
46 | } | ||
47 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap new file mode 100644 index 000000000..a6fda0cf2 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap | |||
@@ -0,0 +1,47 @@ | |||
1 | Created: 2019-01-19T13:42:17.835351+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "y", | ||
9 | kind: Some( | ||
10 | Binding | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | }, | ||
18 | CompletionItem { | ||
19 | completion_kind: Reference, | ||
20 | label: "x", | ||
21 | kind: Some( | ||
22 | Binding | ||
23 | ), | ||
24 | detail: None, | ||
25 | lookup: None, | ||
26 | insert_text_format: PlainText, | ||
27 | text_edit: None, | ||
28 | additional_text_edits: None | ||
29 | }, | ||
30 | CompletionItem { | ||
31 | completion_kind: Reference, | ||
32 | label: "quux", | ||
33 | kind: Some( | ||
34 | Function | ||
35 | ), | ||
36 | detail: None, | ||
37 | lookup: None, | ||
38 | insert_text_format: Snippet, | ||
39 | text_edit: Some( | ||
40 | AtomTextEdit { | ||
41 | delete: [78; 79), | ||
42 | insert: "quux($0)" | ||
43 | } | ||
44 | ), | ||
45 | additional_text_edits: None | ||
46 | } | ||
47 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap new file mode 100644 index 000000000..b27674da4 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap | |||
@@ -0,0 +1,125 @@ | |||
1 | Created: 2019-01-19T13:42:17.819543+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "if", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [54; 56), | ||
18 | insert: "if $0 {}" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Keyword, | ||
25 | label: "match", | ||
26 | kind: Some( | ||
27 | Keyword | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [54; 56), | ||
35 | insert: "match $0 {}" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | }, | ||
40 | CompletionItem { | ||
41 | completion_kind: Keyword, | ||
42 | label: "while", | ||
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | lookup: None, | ||
48 | insert_text_format: Snippet, | ||
49 | text_edit: Some( | ||
50 | AtomTextEdit { | ||
51 | delete: [54; 56), | ||
52 | insert: "while $0 {}" | ||
53 | } | ||
54 | ), | ||
55 | additional_text_edits: None | ||
56 | }, | ||
57 | CompletionItem { | ||
58 | completion_kind: Keyword, | ||
59 | label: "loop", | ||
60 | kind: Some( | ||
61 | Keyword | ||
62 | ), | ||
63 | detail: None, | ||
64 | lookup: None, | ||
65 | insert_text_format: Snippet, | ||
66 | text_edit: Some( | ||
67 | AtomTextEdit { | ||
68 | delete: [54; 56), | ||
69 | insert: "loop {$0}" | ||
70 | } | ||
71 | ), | ||
72 | additional_text_edits: None | ||
73 | }, | ||
74 | CompletionItem { | ||
75 | completion_kind: Keyword, | ||
76 | label: "continue", | ||
77 | kind: Some( | ||
78 | Keyword | ||
79 | ), | ||
80 | detail: None, | ||
81 | lookup: None, | ||
82 | insert_text_format: Snippet, | ||
83 | text_edit: Some( | ||
84 | AtomTextEdit { | ||
85 | delete: [54; 56), | ||
86 | insert: "continue;" | ||
87 | } | ||
88 | ), | ||
89 | additional_text_edits: None | ||
90 | }, | ||
91 | CompletionItem { | ||
92 | completion_kind: Keyword, | ||
93 | label: "break", | ||
94 | kind: Some( | ||
95 | Keyword | ||
96 | ), | ||
97 | detail: None, | ||
98 | lookup: None, | ||
99 | insert_text_format: Snippet, | ||
100 | text_edit: Some( | ||
101 | AtomTextEdit { | ||
102 | delete: [54; 56), | ||
103 | insert: "break;" | ||
104 | } | ||
105 | ), | ||
106 | additional_text_edits: None | ||
107 | }, | ||
108 | CompletionItem { | ||
109 | completion_kind: Keyword, | ||
110 | label: "return", | ||
111 | kind: Some( | ||
112 | Keyword | ||
113 | ), | ||
114 | detail: None, | ||
115 | lookup: None, | ||
116 | insert_text_format: Snippet, | ||
117 | text_edit: Some( | ||
118 | AtomTextEdit { | ||
119 | delete: [54; 56), | ||
120 | insert: "return $0;" | ||
121 | } | ||
122 | ), | ||
123 | additional_text_edits: None | ||
124 | } | ||
125 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap new file mode 100644 index 000000000..4ebc16822 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap | |||
@@ -0,0 +1,91 @@ | |||
1 | Created: 2019-01-19T13:42:17.830288+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "if", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [59; 61), | ||
18 | insert: "if $0 {}" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Keyword, | ||
25 | label: "match", | ||
26 | kind: Some( | ||
27 | Keyword | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [59; 61), | ||
35 | insert: "match $0 {}" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | }, | ||
40 | CompletionItem { | ||
41 | completion_kind: Keyword, | ||
42 | label: "while", | ||
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | lookup: None, | ||
48 | insert_text_format: Snippet, | ||
49 | text_edit: Some( | ||
50 | AtomTextEdit { | ||
51 | delete: [59; 61), | ||
52 | insert: "while $0 {}" | ||
53 | } | ||
54 | ), | ||
55 | additional_text_edits: None | ||
56 | }, | ||
57 | CompletionItem { | ||
58 | completion_kind: Keyword, | ||
59 | label: "loop", | ||
60 | kind: Some( | ||
61 | Keyword | ||
62 | ), | ||
63 | detail: None, | ||
64 | lookup: None, | ||
65 | insert_text_format: Snippet, | ||
66 | text_edit: Some( | ||
67 | AtomTextEdit { | ||
68 | delete: [59; 61), | ||
69 | insert: "loop {$0}" | ||
70 | } | ||
71 | ), | ||
72 | additional_text_edits: None | ||
73 | }, | ||
74 | CompletionItem { | ||
75 | completion_kind: Keyword, | ||
76 | label: "return", | ||
77 | kind: Some( | ||
78 | Keyword | ||
79 | ), | ||
80 | detail: None, | ||
81 | lookup: None, | ||
82 | insert_text_format: Snippet, | ||
83 | text_edit: Some( | ||
84 | AtomTextEdit { | ||
85 | delete: [59; 61), | ||
86 | insert: "return $0;" | ||
87 | } | ||
88 | ), | ||
89 | additional_text_edits: None | ||
90 | } | ||
91 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completion_postfix.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completion_postfix.snap new file mode 100644 index 000000000..60b5a7424 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completion_postfix.snap | |||
@@ -0,0 +1,102 @@ | |||
1 | Created: 2019-01-19T13:50:41.824939+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Postfix, | ||
8 | label: "not", | ||
9 | kind: None, | ||
10 | detail: None, | ||
11 | lookup: None, | ||
12 | insert_text_format: Snippet, | ||
13 | text_edit: Some( | ||
14 | AtomTextEdit { | ||
15 | delete: [78; 78), | ||
16 | insert: "!not" | ||
17 | } | ||
18 | ), | ||
19 | additional_text_edits: Some( | ||
20 | TextEdit { | ||
21 | atoms: [ | ||
22 | AtomTextEdit { | ||
23 | delete: [72; 78), | ||
24 | insert: "" | ||
25 | } | ||
26 | ] | ||
27 | } | ||
28 | ) | ||
29 | }, | ||
30 | CompletionItem { | ||
31 | completion_kind: Postfix, | ||
32 | label: "if", | ||
33 | kind: None, | ||
34 | detail: None, | ||
35 | lookup: None, | ||
36 | insert_text_format: Snippet, | ||
37 | text_edit: Some( | ||
38 | AtomTextEdit { | ||
39 | delete: [78; 78), | ||
40 | insert: "if bar {$0}" | ||
41 | } | ||
42 | ), | ||
43 | additional_text_edits: Some( | ||
44 | TextEdit { | ||
45 | atoms: [ | ||
46 | AtomTextEdit { | ||
47 | delete: [72; 78), | ||
48 | insert: "" | ||
49 | } | ||
50 | ] | ||
51 | } | ||
52 | ) | ||
53 | }, | ||
54 | CompletionItem { | ||
55 | completion_kind: Postfix, | ||
56 | label: "match", | ||
57 | kind: None, | ||
58 | detail: None, | ||
59 | lookup: None, | ||
60 | insert_text_format: Snippet, | ||
61 | text_edit: Some( | ||
62 | AtomTextEdit { | ||
63 | delete: [78; 78), | ||
64 | insert: "match bar {\n${1:_} => {$0\\},\n}" | ||
65 | } | ||
66 | ), | ||
67 | additional_text_edits: Some( | ||
68 | TextEdit { | ||
69 | atoms: [ | ||
70 | AtomTextEdit { | ||
71 | delete: [72; 78), | ||
72 | insert: "" | ||
73 | } | ||
74 | ] | ||
75 | } | ||
76 | ) | ||
77 | }, | ||
78 | CompletionItem { | ||
79 | completion_kind: Postfix, | ||
80 | label: "while", | ||
81 | kind: None, | ||
82 | detail: None, | ||
83 | lookup: None, | ||
84 | insert_text_format: Snippet, | ||
85 | text_edit: Some( | ||
86 | AtomTextEdit { | ||
87 | delete: [78; 78), | ||
88 | insert: "while bar {\n$0\n}" | ||
89 | } | ||
90 | ), | ||
91 | additional_text_edits: Some( | ||
92 | TextEdit { | ||
93 | atoms: [ | ||
94 | AtomTextEdit { | ||
95 | delete: [72; 78), | ||
96 | insert: "" | ||
97 | } | ||
98 | ] | ||
99 | } | ||
100 | ) | ||
101 | } | ||
102 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap new file mode 100644 index 000000000..b33bc3e04 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap | |||
@@ -0,0 +1,18 @@ | |||
1 | Created: 2019-01-19T11:53:16.799862+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "Spam", | ||
9 | kind: Some( | ||
10 | Struct | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | } | ||
18 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap new file mode 100644 index 000000000..0a96291ab --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap | |||
@@ -0,0 +1,91 @@ | |||
1 | Created: 2019-01-19T13:42:17.821375+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "if", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [84; 102), | ||
18 | insert: "if $0 {}" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Keyword, | ||
25 | label: "match", | ||
26 | kind: Some( | ||
27 | Keyword | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [84; 102), | ||
35 | insert: "match $0 {}" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | }, | ||
40 | CompletionItem { | ||
41 | completion_kind: Keyword, | ||
42 | label: "while", | ||
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | lookup: None, | ||
48 | insert_text_format: Snippet, | ||
49 | text_edit: Some( | ||
50 | AtomTextEdit { | ||
51 | delete: [84; 102), | ||
52 | insert: "while $0 {}" | ||
53 | } | ||
54 | ), | ||
55 | additional_text_edits: None | ||
56 | }, | ||
57 | CompletionItem { | ||
58 | completion_kind: Keyword, | ||
59 | label: "loop", | ||
60 | kind: Some( | ||
61 | Keyword | ||
62 | ), | ||
63 | detail: None, | ||
64 | lookup: None, | ||
65 | insert_text_format: Snippet, | ||
66 | text_edit: Some( | ||
67 | AtomTextEdit { | ||
68 | delete: [84; 102), | ||
69 | insert: "loop {$0}" | ||
70 | } | ||
71 | ), | ||
72 | additional_text_edits: None | ||
73 | }, | ||
74 | CompletionItem { | ||
75 | completion_kind: Keyword, | ||
76 | label: "return", | ||
77 | kind: Some( | ||
78 | Keyword | ||
79 | ), | ||
80 | detail: None, | ||
81 | lookup: None, | ||
82 | insert_text_format: Snippet, | ||
83 | text_edit: Some( | ||
84 | AtomTextEdit { | ||
85 | delete: [84; 102), | ||
86 | insert: "return $0" | ||
87 | } | ||
88 | ), | ||
89 | additional_text_edits: None | ||
90 | } | ||
91 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap new file mode 100644 index 000000000..5126c2bdc --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap | |||
@@ -0,0 +1,30 @@ | |||
1 | Created: 2019-01-19T11:53:16.799845+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "main", | ||
9 | kind: Some( | ||
10 | Function | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | }, | ||
18 | CompletionItem { | ||
19 | completion_kind: Reference, | ||
20 | label: "frobnicate", | ||
21 | kind: Some( | ||
22 | Function | ||
23 | ), | ||
24 | detail: None, | ||
25 | lookup: None, | ||
26 | insert_text_format: PlainText, | ||
27 | text_edit: None, | ||
28 | additional_text_edits: None | ||
29 | } | ||
30 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap new file mode 100644 index 000000000..dd91e337a --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap | |||
@@ -0,0 +1,18 @@ | |||
1 | Created: 2019-01-19T11:53:16.799820+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "foo", | ||
9 | kind: Some( | ||
10 | Function | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | } | ||
18 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap new file mode 100644 index 000000000..9c1c3fe6a --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap | |||
@@ -0,0 +1,35 @@ | |||
1 | Created: 2019-01-19T13:42:17.841643+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "bar", | ||
9 | kind: Some( | ||
10 | Binding | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | }, | ||
18 | CompletionItem { | ||
19 | completion_kind: Reference, | ||
20 | label: "foo", | ||
21 | kind: Some( | ||
22 | Function | ||
23 | ), | ||
24 | detail: None, | ||
25 | lookup: None, | ||
26 | insert_text_format: Snippet, | ||
27 | text_edit: Some( | ||
28 | AtomTextEdit { | ||
29 | delete: [108; 146), | ||
30 | insert: "foo()$0" | ||
31 | } | ||
32 | ), | ||
33 | additional_text_edits: None | ||
34 | } | ||
35 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap new file mode 100644 index 000000000..7d693be77 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap | |||
@@ -0,0 +1,40 @@ | |||
1 | Created: 2019-01-19T13:42:17.844671+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "no_args", | ||
9 | kind: Some( | ||
10 | Function | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [53; 56), | ||
18 | insert: "no_args()$0" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Reference, | ||
25 | label: "main", | ||
26 | kind: Some( | ||
27 | Function | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [53; 56), | ||
35 | insert: "main()$0" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | } | ||
40 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap new file mode 100644 index 000000000..1d2946c49 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap | |||
@@ -0,0 +1,40 @@ | |||
1 | Created: 2019-01-19T13:42:17.849139+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "main", | ||
9 | kind: Some( | ||
10 | Function | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [72; 77), | ||
18 | insert: "main()$0" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Reference, | ||
25 | label: "with_args", | ||
26 | kind: Some( | ||
27 | Function | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [72; 77), | ||
35 | insert: "with_args($0)" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | } | ||
40 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap new file mode 100644 index 000000000..2059d63e8 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap | |||
@@ -0,0 +1,91 @@ | |||
1 | Created: 2019-01-19T13:42:17.819926+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "if", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [24; 54), | ||
18 | insert: "if $0 {}" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Keyword, | ||
25 | label: "match", | ||
26 | kind: Some( | ||
27 | Keyword | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [24; 54), | ||
35 | insert: "match $0 {}" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | }, | ||
40 | CompletionItem { | ||
41 | completion_kind: Keyword, | ||
42 | label: "while", | ||
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | lookup: None, | ||
48 | insert_text_format: Snippet, | ||
49 | text_edit: Some( | ||
50 | AtomTextEdit { | ||
51 | delete: [24; 54), | ||
52 | insert: "while $0 {}" | ||
53 | } | ||
54 | ), | ||
55 | additional_text_edits: None | ||
56 | }, | ||
57 | CompletionItem { | ||
58 | completion_kind: Keyword, | ||
59 | label: "loop", | ||
60 | kind: Some( | ||
61 | Keyword | ||
62 | ), | ||
63 | detail: None, | ||
64 | lookup: None, | ||
65 | insert_text_format: Snippet, | ||
66 | text_edit: Some( | ||
67 | AtomTextEdit { | ||
68 | delete: [24; 54), | ||
69 | insert: "loop {$0}" | ||
70 | } | ||
71 | ), | ||
72 | additional_text_edits: None | ||
73 | }, | ||
74 | CompletionItem { | ||
75 | completion_kind: Keyword, | ||
76 | label: "return", | ||
77 | kind: Some( | ||
78 | Keyword | ||
79 | ), | ||
80 | detail: None, | ||
81 | lookup: None, | ||
82 | insert_text_format: Snippet, | ||
83 | text_edit: Some( | ||
84 | AtomTextEdit { | ||
85 | delete: [24; 54), | ||
86 | insert: "return;" | ||
87 | } | ||
88 | ), | ||
89 | additional_text_edits: None | ||
90 | } | ||
91 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap new file mode 100644 index 000000000..2cc81582c --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap | |||
@@ -0,0 +1,125 @@ | |||
1 | Created: 2019-01-19T13:42:17.819839+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "if", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [91; 105), | ||
18 | insert: "if $0 {}" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Keyword, | ||
25 | label: "match", | ||
26 | kind: Some( | ||
27 | Keyword | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [91; 105), | ||
35 | insert: "match $0 {}" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | }, | ||
40 | CompletionItem { | ||
41 | completion_kind: Keyword, | ||
42 | label: "while", | ||
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | lookup: None, | ||
48 | insert_text_format: Snippet, | ||
49 | text_edit: Some( | ||
50 | AtomTextEdit { | ||
51 | delete: [91; 105), | ||
52 | insert: "while $0 {}" | ||
53 | } | ||
54 | ), | ||
55 | additional_text_edits: None | ||
56 | }, | ||
57 | CompletionItem { | ||
58 | completion_kind: Keyword, | ||
59 | label: "loop", | ||
60 | kind: Some( | ||
61 | Keyword | ||
62 | ), | ||
63 | detail: None, | ||
64 | lookup: None, | ||
65 | insert_text_format: Snippet, | ||
66 | text_edit: Some( | ||
67 | AtomTextEdit { | ||
68 | delete: [91; 105), | ||
69 | insert: "loop {$0}" | ||
70 | } | ||
71 | ), | ||
72 | additional_text_edits: None | ||
73 | }, | ||
74 | CompletionItem { | ||
75 | completion_kind: Keyword, | ||
76 | label: "else", | ||
77 | kind: Some( | ||
78 | Keyword | ||
79 | ), | ||
80 | detail: None, | ||
81 | lookup: None, | ||
82 | insert_text_format: Snippet, | ||
83 | text_edit: Some( | ||
84 | AtomTextEdit { | ||
85 | delete: [91; 105), | ||
86 | insert: "else {$0}" | ||
87 | } | ||
88 | ), | ||
89 | additional_text_edits: None | ||
90 | }, | ||
91 | CompletionItem { | ||
92 | completion_kind: Keyword, | ||
93 | label: "else if", | ||
94 | kind: Some( | ||
95 | Keyword | ||
96 | ), | ||
97 | detail: None, | ||
98 | lookup: None, | ||
99 | insert_text_format: Snippet, | ||
100 | text_edit: Some( | ||
101 | AtomTextEdit { | ||
102 | delete: [91; 105), | ||
103 | insert: "else if $0 {}" | ||
104 | } | ||
105 | ), | ||
106 | additional_text_edits: None | ||
107 | }, | ||
108 | CompletionItem { | ||
109 | completion_kind: Keyword, | ||
110 | label: "return", | ||
111 | kind: Some( | ||
112 | Keyword | ||
113 | ), | ||
114 | detail: None, | ||
115 | lookup: None, | ||
116 | insert_text_format: Snippet, | ||
117 | text_edit: Some( | ||
118 | AtomTextEdit { | ||
119 | delete: [91; 105), | ||
120 | insert: "return;" | ||
121 | } | ||
122 | ), | ||
123 | additional_text_edits: None | ||
124 | } | ||
125 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap new file mode 100644 index 000000000..26dec82c7 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap | |||
@@ -0,0 +1,91 @@ | |||
1 | Created: 2019-01-19T13:42:17.822255+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "if", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [31; 65), | ||
18 | insert: "if $0 {}" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Keyword, | ||
25 | label: "match", | ||
26 | kind: Some( | ||
27 | Keyword | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [31; 65), | ||
35 | insert: "match $0 {}" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | }, | ||
40 | CompletionItem { | ||
41 | completion_kind: Keyword, | ||
42 | label: "while", | ||
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | lookup: None, | ||
48 | insert_text_format: Snippet, | ||
49 | text_edit: Some( | ||
50 | AtomTextEdit { | ||
51 | delete: [31; 65), | ||
52 | insert: "while $0 {}" | ||
53 | } | ||
54 | ), | ||
55 | additional_text_edits: None | ||
56 | }, | ||
57 | CompletionItem { | ||
58 | completion_kind: Keyword, | ||
59 | label: "loop", | ||
60 | kind: Some( | ||
61 | Keyword | ||
62 | ), | ||
63 | detail: None, | ||
64 | lookup: None, | ||
65 | insert_text_format: Snippet, | ||
66 | text_edit: Some( | ||
67 | AtomTextEdit { | ||
68 | delete: [31; 65), | ||
69 | insert: "loop {$0}" | ||
70 | } | ||
71 | ), | ||
72 | additional_text_edits: None | ||
73 | }, | ||
74 | CompletionItem { | ||
75 | completion_kind: Keyword, | ||
76 | label: "return", | ||
77 | kind: Some( | ||
78 | Keyword | ||
79 | ), | ||
80 | detail: None, | ||
81 | lookup: None, | ||
82 | insert_text_format: Snippet, | ||
83 | text_edit: Some( | ||
84 | AtomTextEdit { | ||
85 | delete: [31; 65), | ||
86 | insert: "return $0;" | ||
87 | } | ||
88 | ), | ||
89 | additional_text_edits: None | ||
90 | } | ||
91 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap new file mode 100644 index 000000000..4167165ec --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap | |||
@@ -0,0 +1,91 @@ | |||
1 | Created: 2019-01-19T13:42:17.830680+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "if", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [24; 58), | ||
18 | insert: "if $0 {}" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Keyword, | ||
25 | label: "match", | ||
26 | kind: Some( | ||
27 | Keyword | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [24; 58), | ||
35 | insert: "match $0 {}" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | }, | ||
40 | CompletionItem { | ||
41 | completion_kind: Keyword, | ||
42 | label: "while", | ||
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | lookup: None, | ||
48 | insert_text_format: Snippet, | ||
49 | text_edit: Some( | ||
50 | AtomTextEdit { | ||
51 | delete: [24; 58), | ||
52 | insert: "while $0 {}" | ||
53 | } | ||
54 | ), | ||
55 | additional_text_edits: None | ||
56 | }, | ||
57 | CompletionItem { | ||
58 | completion_kind: Keyword, | ||
59 | label: "loop", | ||
60 | kind: Some( | ||
61 | Keyword | ||
62 | ), | ||
63 | detail: None, | ||
64 | lookup: None, | ||
65 | insert_text_format: Snippet, | ||
66 | text_edit: Some( | ||
67 | AtomTextEdit { | ||
68 | delete: [24; 58), | ||
69 | insert: "loop {$0}" | ||
70 | } | ||
71 | ), | ||
72 | additional_text_edits: None | ||
73 | }, | ||
74 | CompletionItem { | ||
75 | completion_kind: Keyword, | ||
76 | label: "return", | ||
77 | kind: Some( | ||
78 | Keyword | ||
79 | ), | ||
80 | detail: None, | ||
81 | lookup: None, | ||
82 | insert_text_format: Snippet, | ||
83 | text_edit: Some( | ||
84 | AtomTextEdit { | ||
85 | delete: [24; 58), | ||
86 | insert: "return;" | ||
87 | } | ||
88 | ), | ||
89 | additional_text_edits: None | ||
90 | } | ||
91 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap new file mode 100644 index 000000000..db137d896 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap | |||
@@ -0,0 +1,52 @@ | |||
1 | Created: 2019-01-19T13:42:17.819227+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "crate", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [16; 30), | ||
18 | insert: "crate::" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Keyword, | ||
25 | label: "self", | ||
26 | kind: Some( | ||
27 | Keyword | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: PlainText, | ||
32 | text_edit: None, | ||
33 | additional_text_edits: None | ||
34 | }, | ||
35 | CompletionItem { | ||
36 | completion_kind: Keyword, | ||
37 | label: "super", | ||
38 | kind: Some( | ||
39 | Keyword | ||
40 | ), | ||
41 | detail: None, | ||
42 | lookup: None, | ||
43 | insert_text_format: PlainText, | ||
44 | text_edit: Some( | ||
45 | AtomTextEdit { | ||
46 | delete: [16; 30), | ||
47 | insert: "super::" | ||
48 | } | ||
49 | ), | ||
50 | additional_text_edits: None | ||
51 | } | ||
52 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap new file mode 100644 index 000000000..1ff0f4939 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap | |||
@@ -0,0 +1,35 @@ | |||
1 | Created: 2019-01-19T13:42:17.822990+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "self", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | }, | ||
18 | CompletionItem { | ||
19 | completion_kind: Keyword, | ||
20 | label: "super", | ||
21 | kind: Some( | ||
22 | Keyword | ||
23 | ), | ||
24 | detail: None, | ||
25 | lookup: None, | ||
26 | insert_text_format: PlainText, | ||
27 | text_edit: Some( | ||
28 | AtomTextEdit { | ||
29 | delete: [18; 20), | ||
30 | insert: "super::" | ||
31 | } | ||
32 | ), | ||
33 | additional_text_edits: None | ||
34 | } | ||
35 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap new file mode 100644 index 000000000..e14bd209c --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap | |||
@@ -0,0 +1,35 @@ | |||
1 | Created: 2019-01-19T13:42:17.826915+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "self", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | }, | ||
18 | CompletionItem { | ||
19 | completion_kind: Keyword, | ||
20 | label: "super", | ||
21 | kind: Some( | ||
22 | Keyword | ||
23 | ), | ||
24 | detail: None, | ||
25 | lookup: None, | ||
26 | insert_text_format: PlainText, | ||
27 | text_edit: Some( | ||
28 | AtomTextEdit { | ||
29 | delete: [23; 24), | ||
30 | insert: "super::" | ||
31 | } | ||
32 | ), | ||
33 | additional_text_edits: None | ||
34 | } | ||
35 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap new file mode 100644 index 000000000..a72828355 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap | |||
@@ -0,0 +1,91 @@ | |||
1 | Created: 2019-01-19T13:42:17.821139+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "if", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [62; 100), | ||
18 | insert: "if $0 {}" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Keyword, | ||
25 | label: "match", | ||
26 | kind: Some( | ||
27 | Keyword | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [62; 100), | ||
35 | insert: "match $0 {}" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | }, | ||
40 | CompletionItem { | ||
41 | completion_kind: Keyword, | ||
42 | label: "while", | ||
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | lookup: None, | ||
48 | insert_text_format: Snippet, | ||
49 | text_edit: Some( | ||
50 | AtomTextEdit { | ||
51 | delete: [62; 100), | ||
52 | insert: "while $0 {}" | ||
53 | } | ||
54 | ), | ||
55 | additional_text_edits: None | ||
56 | }, | ||
57 | CompletionItem { | ||
58 | completion_kind: Keyword, | ||
59 | label: "loop", | ||
60 | kind: Some( | ||
61 | Keyword | ||
62 | ), | ||
63 | detail: None, | ||
64 | lookup: None, | ||
65 | insert_text_format: Snippet, | ||
66 | text_edit: Some( | ||
67 | AtomTextEdit { | ||
68 | delete: [62; 100), | ||
69 | insert: "loop {$0}" | ||
70 | } | ||
71 | ), | ||
72 | additional_text_edits: None | ||
73 | }, | ||
74 | CompletionItem { | ||
75 | completion_kind: Keyword, | ||
76 | label: "return", | ||
77 | kind: Some( | ||
78 | Keyword | ||
79 | ), | ||
80 | detail: None, | ||
81 | lookup: None, | ||
82 | insert_text_format: Snippet, | ||
83 | text_edit: Some( | ||
84 | AtomTextEdit { | ||
85 | delete: [62; 100), | ||
86 | insert: "return $0;" | ||
87 | } | ||
88 | ), | ||
89 | additional_text_edits: None | ||
90 | } | ||
91 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap new file mode 100644 index 000000000..c5d5e74cb --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap | |||
@@ -0,0 +1,91 @@ | |||
1 | Created: 2019-01-19T13:42:17.829078+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "if", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [62; 100), | ||
18 | insert: "if $0 {}" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Keyword, | ||
25 | label: "match", | ||
26 | kind: Some( | ||
27 | Keyword | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [62; 100), | ||
35 | insert: "match $0 {}" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | }, | ||
40 | CompletionItem { | ||
41 | completion_kind: Keyword, | ||
42 | label: "while", | ||
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | lookup: None, | ||
48 | insert_text_format: Snippet, | ||
49 | text_edit: Some( | ||
50 | AtomTextEdit { | ||
51 | delete: [62; 100), | ||
52 | insert: "while $0 {}" | ||
53 | } | ||
54 | ), | ||
55 | additional_text_edits: None | ||
56 | }, | ||
57 | CompletionItem { | ||
58 | completion_kind: Keyword, | ||
59 | label: "loop", | ||
60 | kind: Some( | ||
61 | Keyword | ||
62 | ), | ||
63 | detail: None, | ||
64 | lookup: None, | ||
65 | insert_text_format: Snippet, | ||
66 | text_edit: Some( | ||
67 | AtomTextEdit { | ||
68 | delete: [62; 100), | ||
69 | insert: "loop {$0}" | ||
70 | } | ||
71 | ), | ||
72 | additional_text_edits: None | ||
73 | }, | ||
74 | CompletionItem { | ||
75 | completion_kind: Keyword, | ||
76 | label: "return", | ||
77 | kind: Some( | ||
78 | Keyword | ||
79 | ), | ||
80 | detail: None, | ||
81 | lookup: None, | ||
82 | insert_text_format: Snippet, | ||
83 | text_edit: Some( | ||
84 | AtomTextEdit { | ||
85 | delete: [62; 100), | ||
86 | insert: "return $0;" | ||
87 | } | ||
88 | ), | ||
89 | additional_text_edits: None | ||
90 | } | ||
91 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap new file mode 100644 index 000000000..c18b44d59 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap | |||
@@ -0,0 +1,23 @@ | |||
1 | Created: 2019-01-19T13:42:17.817204+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "the_method", | ||
9 | kind: Some( | ||
10 | Method | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [143; 144), | ||
18 | insert: "the_method($0)" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | } | ||
23 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap new file mode 100644 index 000000000..8d262a91d --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap | |||
@@ -0,0 +1,47 @@ | |||
1 | Created: 2019-01-19T13:42:17.835687+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "quux", | ||
9 | kind: Some( | ||
10 | Function | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [72; 102), | ||
18 | insert: "quux()$0" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Reference, | ||
25 | label: "Foo", | ||
26 | kind: Some( | ||
27 | Struct | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: PlainText, | ||
32 | text_edit: None, | ||
33 | additional_text_edits: None | ||
34 | }, | ||
35 | CompletionItem { | ||
36 | completion_kind: Reference, | ||
37 | label: "Baz", | ||
38 | kind: Some( | ||
39 | Enum | ||
40 | ), | ||
41 | detail: None, | ||
42 | lookup: None, | ||
43 | insert_text_format: PlainText, | ||
44 | text_edit: None, | ||
45 | additional_text_edits: None | ||
46 | } | ||
47 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap new file mode 100644 index 000000000..097344521 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap | |||
@@ -0,0 +1,35 @@ | |||
1 | Created: 2019-01-19T13:42:17.836102+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "quux", | ||
9 | kind: Some( | ||
10 | Function | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [100; 102), | ||
18 | insert: "quux()$0" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Reference, | ||
25 | label: "Bar", | ||
26 | kind: Some( | ||
27 | Struct | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: PlainText, | ||
32 | text_edit: None, | ||
33 | additional_text_edits: None | ||
34 | } | ||
35 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap new file mode 100644 index 000000000..dbe1e0445 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap | |||
@@ -0,0 +1,30 @@ | |||
1 | Created: 2019-01-19T11:53:16.799743+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "Spam", | ||
9 | kind: Some( | ||
10 | Struct | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | }, | ||
18 | CompletionItem { | ||
19 | completion_kind: Reference, | ||
20 | label: "foo", | ||
21 | kind: Some( | ||
22 | Module | ||
23 | ), | ||
24 | detail: None, | ||
25 | lookup: None, | ||
26 | insert_text_format: PlainText, | ||
27 | text_edit: None, | ||
28 | additional_text_edits: None | ||
29 | } | ||
30 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__no_non_self_method.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__no_non_self_method.snap new file mode 100644 index 000000000..417b692dc --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__no_non_self_method.snap | |||
@@ -0,0 +1,5 @@ | |||
1 | Created: 2019-01-19T11:34:11.702251+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap new file mode 100644 index 000000000..26c54018e --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap | |||
@@ -0,0 +1,125 @@ | |||
1 | Created: 2019-01-19T13:42:17.821881+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Keyword, | ||
8 | label: "if", | ||
9 | kind: Some( | ||
10 | Keyword | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [106; 108), | ||
18 | insert: "if $0 {}" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Keyword, | ||
25 | label: "match", | ||
26 | kind: Some( | ||
27 | Keyword | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [106; 108), | ||
35 | insert: "match $0 {}" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | }, | ||
40 | CompletionItem { | ||
41 | completion_kind: Keyword, | ||
42 | label: "while", | ||
43 | kind: Some( | ||
44 | Keyword | ||
45 | ), | ||
46 | detail: None, | ||
47 | lookup: None, | ||
48 | insert_text_format: Snippet, | ||
49 | text_edit: Some( | ||
50 | AtomTextEdit { | ||
51 | delete: [106; 108), | ||
52 | insert: "while $0 {}" | ||
53 | } | ||
54 | ), | ||
55 | additional_text_edits: None | ||
56 | }, | ||
57 | CompletionItem { | ||
58 | completion_kind: Keyword, | ||
59 | label: "loop", | ||
60 | kind: Some( | ||
61 | Keyword | ||
62 | ), | ||
63 | detail: None, | ||
64 | lookup: None, | ||
65 | insert_text_format: Snippet, | ||
66 | text_edit: Some( | ||
67 | AtomTextEdit { | ||
68 | delete: [106; 108), | ||
69 | insert: "loop {$0}" | ||
70 | } | ||
71 | ), | ||
72 | additional_text_edits: None | ||
73 | }, | ||
74 | CompletionItem { | ||
75 | completion_kind: Keyword, | ||
76 | label: "continue", | ||
77 | kind: Some( | ||
78 | Keyword | ||
79 | ), | ||
80 | detail: None, | ||
81 | lookup: None, | ||
82 | insert_text_format: Snippet, | ||
83 | text_edit: Some( | ||
84 | AtomTextEdit { | ||
85 | delete: [106; 108), | ||
86 | insert: "continue" | ||
87 | } | ||
88 | ), | ||
89 | additional_text_edits: None | ||
90 | }, | ||
91 | CompletionItem { | ||
92 | completion_kind: Keyword, | ||
93 | label: "break", | ||
94 | kind: Some( | ||
95 | Keyword | ||
96 | ), | ||
97 | detail: None, | ||
98 | lookup: None, | ||
99 | insert_text_format: Snippet, | ||
100 | text_edit: Some( | ||
101 | AtomTextEdit { | ||
102 | delete: [106; 108), | ||
103 | insert: "break" | ||
104 | } | ||
105 | ), | ||
106 | additional_text_edits: None | ||
107 | }, | ||
108 | CompletionItem { | ||
109 | completion_kind: Keyword, | ||
110 | label: "return", | ||
111 | kind: Some( | ||
112 | Keyword | ||
113 | ), | ||
114 | detail: None, | ||
115 | lookup: None, | ||
116 | insert_text_format: Snippet, | ||
117 | text_edit: Some( | ||
118 | AtomTextEdit { | ||
119 | delete: [106; 108), | ||
120 | insert: "return" | ||
121 | } | ||
122 | ), | ||
123 | additional_text_edits: None | ||
124 | } | ||
125 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__no_struct_field_completion_for_method_call.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__no_struct_field_completion_for_method_call.snap new file mode 100644 index 000000000..0948c9fe6 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__no_struct_field_completion_for_method_call.snap | |||
@@ -0,0 +1,5 @@ | |||
1 | Created: 2019-01-19T11:34:11.702201+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap new file mode 100644 index 000000000..160da9e31 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap | |||
@@ -0,0 +1,18 @@ | |||
1 | Created: 2019-01-19T11:27:14.070727+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Magic, | ||
8 | label: "file_id: FileId", | ||
9 | kind: None, | ||
10 | detail: None, | ||
11 | lookup: Some( | ||
12 | "file_id" | ||
13 | ), | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | } | ||
18 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap new file mode 100644 index 000000000..baeb01ed9 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap | |||
@@ -0,0 +1,18 @@ | |||
1 | Created: 2019-01-19T11:29:09.355053+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Magic, | ||
8 | label: "file_id: FileId", | ||
9 | kind: None, | ||
10 | detail: None, | ||
11 | lookup: Some( | ||
12 | "file_id" | ||
13 | ), | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | } | ||
18 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap new file mode 100644 index 000000000..8193c4f17 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap | |||
@@ -0,0 +1,18 @@ | |||
1 | Created: 2019-01-19T11:29:09.355066+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Magic, | ||
8 | label: "file_id: FileId", | ||
9 | kind: None, | ||
10 | detail: None, | ||
11 | lookup: Some( | ||
12 | "file_id" | ||
13 | ), | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | } | ||
18 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__reference_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__reference_completion.snap new file mode 100644 index 000000000..abd17dcec --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__reference_completion.snap | |||
@@ -0,0 +1,30 @@ | |||
1 | Created: 2019-01-19T11:53:16.799765+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "Foo", | ||
9 | kind: Some( | ||
10 | EnumVariant | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | }, | ||
18 | CompletionItem { | ||
19 | completion_kind: Reference, | ||
20 | label: "Bar", | ||
21 | kind: Some( | ||
22 | EnumVariant | ||
23 | ), | ||
24 | detail: None, | ||
25 | lookup: None, | ||
26 | insert_text_format: PlainText, | ||
27 | text_edit: None, | ||
28 | additional_text_edits: None | ||
29 | } | ||
30 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap new file mode 100644 index 000000000..c00a5ea5d --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap | |||
@@ -0,0 +1,35 @@ | |||
1 | Created: 2019-01-19T13:42:17.837692+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "Foo", | ||
9 | kind: Some( | ||
10 | Struct | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | }, | ||
18 | CompletionItem { | ||
19 | completion_kind: Reference, | ||
20 | label: "x", | ||
21 | kind: Some( | ||
22 | Function | ||
23 | ), | ||
24 | detail: None, | ||
25 | lookup: None, | ||
26 | insert_text_format: Snippet, | ||
27 | text_edit: Some( | ||
28 | AtomTextEdit { | ||
29 | delete: [46; 60), | ||
30 | insert: "x()$0" | ||
31 | } | ||
32 | ), | ||
33 | additional_text_edits: None | ||
34 | } | ||
35 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap new file mode 100644 index 000000000..263b15156 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap | |||
@@ -0,0 +1,18 @@ | |||
1 | Created: 2019-01-19T11:59:18.394156+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "self", | ||
9 | kind: Some( | ||
10 | Binding | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | } | ||
18 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap new file mode 100644 index 000000000..82f0a6d8d --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap | |||
@@ -0,0 +1,40 @@ | |||
1 | Created: 2019-01-19T13:42:17.844708+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Snippet, | ||
8 | label: "pd", | ||
9 | kind: Some( | ||
10 | Snippet | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: Snippet, | ||
15 | text_edit: Some( | ||
16 | AtomTextEdit { | ||
17 | delete: [16; 18), | ||
18 | insert: "eprintln!(\"$0 = {:?}\", $0);" | ||
19 | } | ||
20 | ), | ||
21 | additional_text_edits: None | ||
22 | }, | ||
23 | CompletionItem { | ||
24 | completion_kind: Snippet, | ||
25 | label: "ppd", | ||
26 | kind: Some( | ||
27 | Snippet | ||
28 | ), | ||
29 | detail: None, | ||
30 | lookup: None, | ||
31 | insert_text_format: Snippet, | ||
32 | text_edit: Some( | ||
33 | AtomTextEdit { | ||
34 | delete: [16; 18), | ||
35 | insert: "eprintln!(\"$0 = {:#?}\", $0);" | ||
36 | } | ||
37 | ), | ||
38 | additional_text_edits: None | ||
39 | } | ||
40 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap new file mode 100644 index 000000000..e7cc5c410 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap | |||
@@ -0,0 +1,42 @@ | |||
1 | Created: 2019-01-19T13:42:17.845616+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Snippet, | ||
8 | label: "Test function", | ||
9 | kind: Some( | ||
10 | Snippet | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: Some( | ||
14 | "tfn" | ||
15 | ), | ||
16 | insert_text_format: Snippet, | ||
17 | text_edit: Some( | ||
18 | AtomTextEdit { | ||
19 | delete: [49; 79), | ||
20 | insert: "#[test]\nfn ${1:feature}() {\n $0\n}" | ||
21 | } | ||
22 | ), | ||
23 | additional_text_edits: None | ||
24 | }, | ||
25 | CompletionItem { | ||
26 | completion_kind: Snippet, | ||
27 | label: "pub(crate)", | ||
28 | kind: Some( | ||
29 | Snippet | ||
30 | ), | ||
31 | detail: None, | ||
32 | lookup: None, | ||
33 | insert_text_format: Snippet, | ||
34 | text_edit: Some( | ||
35 | AtomTextEdit { | ||
36 | delete: [49; 79), | ||
37 | insert: "pub(crate) $0" | ||
38 | } | ||
39 | ), | ||
40 | additional_text_edits: None | ||
41 | } | ||
42 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap new file mode 100644 index 000000000..d27ca5f8f --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap | |||
@@ -0,0 +1,20 @@ | |||
1 | Created: 2019-01-19T11:34:11.702218+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "the_field", | ||
9 | kind: Some( | ||
10 | Field | ||
11 | ), | ||
12 | detail: Some( | ||
13 | "u32" | ||
14 | ), | ||
15 | lookup: None, | ||
16 | insert_text_format: PlainText, | ||
17 | text_edit: None, | ||
18 | additional_text_edits: None | ||
19 | } | ||
20 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap new file mode 100644 index 000000000..8e547ad37 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap | |||
@@ -0,0 +1,37 @@ | |||
1 | Created: 2019-01-19T13:42:17.817216+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "the_field", | ||
9 | kind: Some( | ||
10 | Field | ||
11 | ), | ||
12 | detail: Some( | ||
13 | "(u32, i32)" | ||
14 | ), | ||
15 | lookup: None, | ||
16 | insert_text_format: PlainText, | ||
17 | text_edit: None, | ||
18 | additional_text_edits: None | ||
19 | }, | ||
20 | CompletionItem { | ||
21 | completion_kind: Reference, | ||
22 | label: "foo", | ||
23 | kind: Some( | ||
24 | Method | ||
25 | ), | ||
26 | detail: None, | ||
27 | lookup: None, | ||
28 | insert_text_format: Snippet, | ||
29 | text_edit: Some( | ||
30 | AtomTextEdit { | ||
31 | delete: [125; 126), | ||
32 | insert: "foo($0)" | ||
33 | } | ||
34 | ), | ||
35 | additional_text_edits: None | ||
36 | } | ||
37 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap new file mode 100644 index 000000000..4536cee17 --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap | |||
@@ -0,0 +1,37 @@ | |||
1 | Created: 2019-01-19T13:42:17.817207+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "the_field", | ||
9 | kind: Some( | ||
10 | Field | ||
11 | ), | ||
12 | detail: Some( | ||
13 | "(u32,)" | ||
14 | ), | ||
15 | lookup: None, | ||
16 | insert_text_format: PlainText, | ||
17 | text_edit: None, | ||
18 | additional_text_edits: None | ||
19 | }, | ||
20 | CompletionItem { | ||
21 | completion_kind: Reference, | ||
22 | label: "foo", | ||
23 | kind: Some( | ||
24 | Method | ||
25 | ), | ||
26 | detail: None, | ||
27 | lookup: None, | ||
28 | insert_text_format: Snippet, | ||
29 | text_edit: Some( | ||
30 | AtomTextEdit { | ||
31 | delete: [120; 121), | ||
32 | insert: "foo($0)" | ||
33 | } | ||
34 | ), | ||
35 | additional_text_edits: None | ||
36 | } | ||
37 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap new file mode 100644 index 000000000..4c35be33a --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap | |||
@@ -0,0 +1,30 @@ | |||
1 | Created: 2019-01-19T11:53:16.799683+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "Spam", | ||
9 | kind: Some( | ||
10 | Struct | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | }, | ||
18 | CompletionItem { | ||
19 | completion_kind: Reference, | ||
20 | label: "foo", | ||
21 | kind: Some( | ||
22 | Module | ||
23 | ), | ||
24 | detail: None, | ||
25 | lookup: None, | ||
26 | insert_text_format: PlainText, | ||
27 | text_edit: None, | ||
28 | additional_text_edits: None | ||
29 | } | ||
30 | ] | ||
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap new file mode 100644 index 000000000..9780d652a --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap | |||
@@ -0,0 +1,18 @@ | |||
1 | Created: 2019-01-19T11:53:16.799788+00:00 | ||
2 | Creator: [email protected] | ||
3 | Source: crates/ra_ide_api/src/completion/completion_item.rs | ||
4 | |||
5 | [ | ||
6 | CompletionItem { | ||
7 | completion_kind: Reference, | ||
8 | label: "Bar", | ||
9 | kind: Some( | ||
10 | Struct | ||
11 | ), | ||
12 | detail: None, | ||
13 | lookup: None, | ||
14 | insert_text_format: PlainText, | ||
15 | text_edit: None, | ||
16 | additional_text_edits: None | ||
17 | } | ||
18 | ] | ||