Put preselect items on top

This commit is contained in:
Aleksey Kladov
2020-05-14 15:29:40 +02:00
parent 90c62bcee9
commit fc0c5dfcd1

View File

@@ -178,7 +178,9 @@ pub(crate) fn completion_item(
};
if completion_item.score().is_some() {
res.preselect = Some(true)
res.preselect = Some(true);
// HACK: sort preselect items first
res.sort_text = Some(format!(" {}", completion_item.label()));
}
if completion_item.deprecated() {