Don't set sortText

I might be reading this wrong, but it looks like we are setting it to
essentially arbitrary string at the moment, as there are no defined
order on the items in the *set* of completions.
This commit is contained in:
Aleksey Kladov
2020-04-24 01:52:26 +02:00
parent 647683b9bb
commit 88d243c742
2 changed files with 10 additions and 18 deletions

View File

@@ -423,11 +423,8 @@ pub fn handle_completion(
};
let line_index = world.analysis().file_line_index(position.file_id)?;
let line_endings = world.file_line_endings(position.file_id);
let mut count_sort_text_item = 0usize;
let items: Vec<CompletionItem> = items
.into_iter()
.map(|item| item.conv_with((&line_index, line_endings, &mut count_sort_text_item)))
.collect();
let items: Vec<CompletionItem> =
items.into_iter().map(|item| item.conv_with((&line_index, line_endings))).collect();
Ok(Some(items.into()))
}