aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/render.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/render.rs')
-rw-r--r--crates/ide_completion/src/render.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs
index 902df46ca..2eabc2a67 100644
--- a/crates/ide_completion/src/render.rs
+++ b/crates/ide_completion/src/render.rs
@@ -132,16 +132,17 @@ fn render_field_(
132 ctx.source_range(), 132 ctx.source_range(),
133 receiver.map_or_else(|| name.clone(), |receiver| format!("{}.{}", receiver, name)), 133 receiver.map_or_else(|| name.clone(), |receiver| format!("{}.{}", receiver, name)),
134 ); 134 );
135 item.kind(SymbolKind::Field)
136 .detail(ty.display(ctx.db()).to_string())
137 .set_documentation(field.docs(ctx.db()))
138 .set_deprecated(is_deprecated);
139 135
140 item.set_relevance(CompletionRelevance { 136 item.set_relevance(CompletionRelevance {
141 type_match: compute_type_match(ctx.completion, ty), 137 type_match: compute_type_match(ctx.completion, ty),
142 exact_name_match: compute_exact_name_match(ctx.completion, &name), 138 exact_name_match: compute_exact_name_match(ctx.completion, &name),
143 ..CompletionRelevance::default() 139 ..CompletionRelevance::default()
144 }); 140 });
141 item.kind(SymbolKind::Field)
142 .detail(ty.display(ctx.db()).to_string())
143 .set_documentation(field.docs(ctx.db()))
144 .set_deprecated(is_deprecated)
145 .lookup_by(name);
145 146
146 if let Some(_ref_match) = compute_ref_match(ctx.completion, ty) { 147 if let Some(_ref_match) = compute_ref_match(ctx.completion, ty) {
147 // FIXME 148 // FIXME
@@ -164,7 +165,9 @@ fn render_tuple_field_(
164 receiver.map_or_else(|| field.to_string(), |receiver| format!("{}.{}", receiver, field)), 165 receiver.map_or_else(|| field.to_string(), |receiver| format!("{}.{}", receiver, field)),
165 ); 166 );
166 167
167 item.kind(SymbolKind::Field).detail(ty.display(ctx.db()).to_string()); 168 item.kind(SymbolKind::Field)
169 .detail(ty.display(ctx.db()).to_string())
170 .lookup_by(field.to_string());
168 171
169 item.build() 172 item.build()
170} 173}