Skip to content

Commit fc0c5df

Browse files
committed
Put preselect items on top
1 parent 90c62bc commit fc0c5df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/rust-analyzer/src/to_proto.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ pub(crate) fn completion_item(
178178
};
179179

180180
if completion_item.score().is_some() {
181-
res.preselect = Some(true)
181+
res.preselect = Some(true);
182+
// HACK: sort preselect items first
183+
res.sort_text = Some(format!(" {}", completion_item.label()));
182184
}
183185

184186
if completion_item.deprecated() {

0 commit comments

Comments
 (0)