aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/completion
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-21 23:24:59 +0000
committerAleksey Kladov <[email protected]>2018-12-21 23:24:59 +0000
commit498e3a6846602b9f2cd40c093007071b4df35817 (patch)
tree1189e57a453155f25fbd5bf71bd814120f044130 /crates/ra_analysis/src/completion
parent8e056ef0428190a1abf363a2409e40751a02ee5b (diff)
binding icon
Diffstat (limited to 'crates/ra_analysis/src/completion')
-rw-r--r--crates/ra_analysis/src/completion/complete_scope.rs6
-rw-r--r--crates/ra_analysis/src/completion/completion_item.rs1
2 files changed, 5 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
4use crate::{ 4use crate::{
5 Cancelable, 5 Cancelable,
6 completion::{CompletionItem, Completions, CompletionKind, CompletionContext}, 6 completion::{CompletionItem, CompletionItemKind, Completions, CompletionKind, CompletionContext},
7}; 7};
8 8
9pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> { 9pub(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);
diff --git a/crates/ra_analysis/src/completion/completion_item.rs b/crates/ra_analysis/src/completion/completion_item.rs
index cbd42a44e..911f08468 100644
--- a/crates/ra_analysis/src/completion/completion_item.rs
+++ b/crates/ra_analysis/src/completion/completion_item.rs
@@ -25,6 +25,7 @@ pub enum CompletionItemKind {
25 Keyword, 25 Keyword,
26 Module, 26 Module,
27 Function, 27 Function,
28 Binding,
28} 29}
29 30
30#[derive(Debug, PartialEq, Eq)] 31#[derive(Debug, PartialEq, Eq)]