Declare labelDetailsSupport client capability #4644
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.
While #3495 claimed
labelDetails
was implemented, it really wasn't because the client capability was never declared, so AFAICT, servers do not sends them down.Servers tested against:
labelDetails
)labelDetails
)labelDetails
)labelDetails
fully, spec compliant)labelDetails
, but theCompletionItemLabelDetails#description
property is never filled in, so it's a noop as far as lsp-mode is concerned, but still spec compliant)labelDetails
, but the signature is inCompletionItemLabelDetails#description
, not spec compliant)P.S. For jdtls, the annotation function will return a really long partly qualified method signature for
CompletionItem#detail
, concatenated to the return type, which is theCompletionItemLabelDetails#description
. To avoid this verbosity and duplication of information, the users are advised to do this:P.P.S rust-analyzer's implementation for
labelDetails
has always been wrong in all channels as of 2024-12-17, but wrong in a way that incidentally can alleviate #4591. If and when the R-A team decides to collectively sit down, study and implement the spec properly, we can see if there's any adjustment we need to do, but otherwise I assume the user can do their own adjustments similar to jdtls.