Honor sort_text
when language server provides completions
This commit is contained in:
parent
7f6b83d8cc
commit
f775cb2947
1 changed files with 3 additions and 1 deletions
|
@ -755,9 +755,11 @@ impl CompletionsMenu {
|
||||||
.collect()
|
.collect()
|
||||||
};
|
};
|
||||||
matches.sort_unstable_by_key(|mat| {
|
matches.sort_unstable_by_key(|mat| {
|
||||||
|
let completion = &self.completions[mat.candidate_id];
|
||||||
(
|
(
|
||||||
|
completion.lsp_completion.sort_text.as_ref(),
|
||||||
Reverse(OrderedFloat(mat.score)),
|
Reverse(OrderedFloat(mat.score)),
|
||||||
self.completions[mat.candidate_id].sort_key(),
|
completion.sort_key(),
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue