Add completion sorting by parameter count#184
Merged
tartarughina merged 1 commit intozed-extensions:mainfrom Jan 30, 2026
Merged
Add completion sorting by parameter count#184tartarughina merged 1 commit intozed-extensions:mainfrom
tartarughina merged 1 commit intozed-extensions:mainfrom
Conversation
Modify LSP completion responses to sort methods and functions by their parameter count, prioritizing items with fewer parameters.
playdohface
approved these changes
Jan 30, 2026
Collaborator
playdohface
left a comment
There was a problem hiding this comment.
As with everything we do in the proxy, it just always feels like a hack. But as hacks go, this seems fine, and seeing as the alternatives are nontrivial changes in either JDTLS or Zed or both this makes sense
Collaborator
Author
|
As @Komposten brought up in #183, the change in the sorting order happened recently and it is likely coming from Zed. I did some digging and a similar issue was already addressed by JDTLS back in 2023. (TK issue) I share with you that this is an hack, but it should enable us to provide a consistent UX, regardless of the changes on Zed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address #183
Sort method completions by parameter count (fewer parameters first).
Previously, JDTLS returned the same sortText value (e.g., 999999179) for all overloads of a method like List.of(), causing Zed to display them in arbitrary order.
This change prefixes sortText with a zero-padded parameter count (e.g., 00999999179, 01999999179, 02999999179), ensuring overloads are sorted from fewest to most parameters.