Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare sortText length before compareToIgnoreCase in LSCompletionProposalComparator #814

Open
zulus opened this issue Sep 18, 2023 · 1 comment

Comments

@zulus
Copy link
Contributor

zulus commented Sep 18, 2023

compareToIgnoreCase produces wrong order. For example server response 15 and 5 sortText. After compareToIgnoreCase 5 will be before 15, when should be after

@zulus
Copy link
Contributor Author

zulus commented Sep 19, 2023

I checked deeper into code and see two issues:

  1. DocumentFilter have main priority, and this is a reason why I sometimes have strange results in JS files after "dot" or operators
  2. Completions aren't re-sorted after filtering. CompletionProposalPopup#computeFilteredProposals just show/hide proposals, so in current state, if completion was invoked after first letter (for example new d|), and filtered is based on letters only (position isn't re-checked) most of completions have no sense, and it's mostly noise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant