@@ -11,14 +11,14 @@ pub(super) fn complete_use_tree_keyword(acc: &mut Completions, ctx: &CompletionC
11
11
let source_range = ctx. source_range ( ) ;
12
12
match ( ctx. use_item_syntax . as_ref ( ) , ctx. path_prefix . as_ref ( ) ) {
13
13
( Some ( _) , None ) => {
14
- CompletionItem :: new ( CompletionKind :: Keyword , source_range, "crate" )
14
+ CompletionItem :: new ( CompletionKind :: Keyword , source_range, "crate:: " )
15
15
. kind ( CompletionItemKind :: Keyword )
16
16
. insert_text ( "crate::" )
17
17
. add_to ( acc) ;
18
18
CompletionItem :: new ( CompletionKind :: Keyword , source_range, "self" )
19
19
. kind ( CompletionItemKind :: Keyword )
20
20
. add_to ( acc) ;
21
- CompletionItem :: new ( CompletionKind :: Keyword , source_range, "super" )
21
+ CompletionItem :: new ( CompletionKind :: Keyword , source_range, "super:: " )
22
22
. kind ( CompletionItemKind :: Keyword )
23
23
. insert_text ( "super::" )
24
24
. add_to ( acc) ;
@@ -27,7 +27,7 @@ pub(super) fn complete_use_tree_keyword(acc: &mut Completions, ctx: &CompletionC
27
27
CompletionItem :: new ( CompletionKind :: Keyword , source_range, "self" )
28
28
. kind ( CompletionItemKind :: Keyword )
29
29
. add_to ( acc) ;
30
- CompletionItem :: new ( CompletionKind :: Keyword , source_range, "super" )
30
+ CompletionItem :: new ( CompletionKind :: Keyword , source_range, "super:: " )
31
31
. kind ( CompletionItemKind :: Keyword )
32
32
. insert_text ( "super::" )
33
33
. add_to ( acc) ;
@@ -182,25 +182,25 @@ mod tests {
182
182
assert_snapshot ! (
183
183
get_keyword_completions( r"use <|>" ) ,
184
184
@r###"
185
- kw crate
185
+ kw crate::
186
186
kw self
187
- kw super
187
+ kw super::
188
188
"###
189
189
) ;
190
190
191
191
assert_snapshot ! (
192
192
get_keyword_completions( r"use a::<|>" ) ,
193
193
@r###"
194
194
kw self
195
- kw super
195
+ kw super::
196
196
"###
197
197
) ;
198
198
199
199
assert_snapshot ! (
200
200
get_keyword_completions( r"use a::{b, <|>}" ) ,
201
201
@r###"
202
202
kw self
203
- kw super
203
+ kw super::
204
204
"###
205
205
) ;
206
206
}
0 commit comments