Add CompletionItem.labelDetails (LSP 3.17)#38
Open
tothambrus11 wants to merge 2 commits into
Open
Conversation
Contributor
|
Hello and thank you! It seems like the tests are effectively just exercising Codable and Optional behaviors? I also think it is probably best rebase this so that only you are the author. This way, it's possible to track the work/responsibility down to an individual. |
Adds the CompletionItemLabelDetails structure and the corresponding labelDetails field on CompletionItem, so servers can return the signature/description next to the label when the client declares completionItem.labelDetailsSupport (which is already modeled).
8004abb to
24bd712
Compare
tothambrus11
commented
Jul 4, 2026
Contributor
Author
|
Thanks for the feedback! I improved the test suite so that now it exercises something according to the LSP spec. I believe I was already the author, and Claude was tagged as a co-author because of part of the mention in the commit description. Now I removed the attribution too. |
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.
Adds
CompletionItemLabelDetailsand the correspondinglabelDetailsfield onCompletionItem(LSP 3.17 spec).The client capability (
CompletionClientCapabilities.CompletionItem.labelDetailsSupport) and the server capability (CompletionOptions.CompletionItem.labelDetailsSupport) are already modeled, but the item field itself was missing, so a server had no way to actually return label details. The field is optional and defaulted, so existing call sites are source-compatible, and it is omitted from the encoded JSON when absent.Includes a test decoding a spec-shaped completion item with
labelDetails.