You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing that was reported by @tomsmeding (regarding HLS) is that the results are pre-sorted by the server to include
case-insensitive matching
typo-fixing
intelligent result ordering so that most likely matches come first
According to the specification, if sortText is not supplied, the client should sort on the label. See here
* A string that should be used when comparing this item
* with other items. When `falsy` the label is used
* as the sort text for this item.
sortText?: string;
If the results should not be sorted, sortText should be supplied to indicate the results should not be sorted as such, otherwise according to the spec we should sort on the label as we currently do which perturbs the HLS returned ordering.
I can look into providing a PR if welcome :) I don't any experience with the HLS codebase though
The text was updated successfully, but these errors were encountered:
Thanks for report it here and the pr offer, sounds good to me. Wonder what is the behaviour of other editors like vscode o emacs, do not they follow the spec?
I don't any experience with the HLS codebase though
My understanding is lsp-mode will also sort by filter-text, and if not fall back to sorting by label, so I think this change will also improve the ordering for lsp-mode :)
As an emacs user, I guess I've never seen the glorious correct ordering of results 😅
A simple hack would be to give our completion items lexicographically increasing sortTexts just before we send them back, thus effectively forcing our own sort order.
We received this issue on the neovim client: neovim/neovim#15414
One thing that was reported by @tomsmeding (regarding HLS) is that the results are pre-sorted by the server to include
According to the specification, if sortText is not supplied, the client should sort on the label. See here
If the results should not be sorted, sortText should be supplied to indicate the results should not be sorted as such, otherwise according to the spec we should sort on the label as we currently do which perturbs the HLS returned ordering.
I can look into providing a PR if welcome :) I don't any experience with the HLS codebase though
The text was updated successfully, but these errors were encountered: