diff options
Diffstat (limited to 'crates/ra_analysis/src/completion/complete_scope.rs')
-rw-r--r-- | crates/ra_analysis/src/completion/complete_scope.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/completion/complete_scope.rs b/crates/ra_analysis/src/completion/complete_scope.rs index 4f27ad9eb..82610d63f 100644 --- a/crates/ra_analysis/src/completion/complete_scope.rs +++ b/crates/ra_analysis/src/completion/complete_scope.rs | |||
@@ -3,7 +3,7 @@ use ra_syntax::TextUnit; | |||
3 | 3 | ||
4 | use crate::{ | 4 | use crate::{ |
5 | Cancelable, | 5 | Cancelable, |
6 | completion::{CompletionItem, Completions, CompletionKind, CompletionContext}, | 6 | completion::{CompletionItem, CompletionItemKind, Completions, CompletionKind, CompletionContext}, |
7 | }; | 7 | }; |
8 | 8 | ||
9 | pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> { | 9 | pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> { |
@@ -46,7 +46,9 @@ fn complete_fn(acc: &mut Completions, scopes: &hir::FnScopes, offset: TextUnit) | |||
46 | .flat_map(|scope| scopes.entries(scope).iter()) | 46 | .flat_map(|scope| scopes.entries(scope).iter()) |
47 | .filter(|entry| shadowed.insert(entry.name())) | 47 | .filter(|entry| shadowed.insert(entry.name())) |
48 | .for_each(|entry| { | 48 | .for_each(|entry| { |
49 | CompletionItem::new(CompletionKind::Reference, entry.name().to_string()).add_to(acc) | 49 | CompletionItem::new(CompletionKind::Reference, entry.name().to_string()) |
50 | .kind(CompletionItemKind::Binding) | ||
51 | .add_to(acc) | ||
50 | }); | 52 | }); |
51 | if scopes.self_param.is_some() { | 53 | if scopes.self_param.is_some() { |
52 | CompletionItem::new(CompletionKind::Reference, "self").add_to(acc); | 54 | CompletionItem::new(CompletionKind::Reference, "self").add_to(acc); |