feat(lsp): support CompletionItem.labelDetails #38403

Problem: CompletionItem.labelDetails is ignored, losing
function signatures and module info in the completion menu.

Solution: Append labelDetails.detail to abbr and use
labelDetails.description for menu with fallback to item.detail.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemLabelDetails
This commit is contained in:
glepnir
2026-03-22 07:07:26 +08:00
committed by GitHub
parent 2069be281c
commit cc518cf9ba
3 changed files with 18 additions and 2 deletions

View File

@@ -488,6 +488,7 @@ function protocol.make_client_capabilities()
tagSupport = {
valueSet = get_value_set(constants.CompletionTag),
},
labelDetailsSupport = true,
},
completionItemKind = {
valueSet = get_value_set(constants.CompletionItemKind),