From d19f440986e9651cc5694c2adc04ac0484580c40 Mon Sep 17 00:00:00 2001 From: Troy Brown Date: Mon, 16 Dec 2024 15:25:08 -0500 Subject: [PATCH] Add SignatureInformation activeParameter support. --- lsp-mode.el | 5 ++++- lsp-protocol.el | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lsp-mode.el b/lsp-mode.el index 58b71ea13e3..156b59fb58c 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -3804,7 +3804,8 @@ disappearing, unset all the variables related to it." (insertTextModeSupport . ((valueSet . [1 2]))))) (contextSupport . t) (dynamicRegistration . t))) - (signatureHelp . ((signatureInformation . ((parameterInformation . ((labelOffsetSupport . t))))) + (signatureHelp . ((signatureInformation . ((parameterInformation . ((labelOffsetSupport . t))) + (activeParameterSupport . t))) (dynamicRegistration . t))) (documentLink . ((dynamicRegistration . t) (tooltipSupport . t))) @@ -5912,6 +5913,8 @@ It will show up only if current point has signature help." (active-signature? (or lsp--signature-last-index active-signature? 0)) (_ (setq lsp--signature-last-index active-signature?)) ((signature &as &SignatureInformation? :label :parameters?) (seq-elt signatures active-signature?)) + (active-parameter? (or (lsp:signature-information-active-parameter? signature) + active-parameter?)) (prefix (if (= (length signatures) 1) "" (concat (propertize (format " %s/%s" diff --git a/lsp-protocol.el b/lsp-protocol.el index a56e2b8e51c..ea70041d007 100644 --- a/lsp-protocol.el +++ b/lsp-protocol.el @@ -695,7 +695,7 @@ See `-let' for a description of the destructuring mechanism." (SignatureHelpCapabilities nil (:contextSupport :dynamicRegistration :signatureInformation)) (SignatureHelpContext (:triggerKind :isRetrigger) (:activeSignatureHelp :triggerCharacter)) (SignatureHelpOptions nil (:retriggerCharacters :triggerCharacters)) - (SignatureInformation (:label) (:documentation :parameters)) + (SignatureInformation (:label) (:documentation :parameters :activeParameter)) (SignatureInformationCapabilities nil (:documentationFormat :parameterInformation)) (StaticRegistrationOptions nil (:documentSelector :id)) (SymbolCapabilities nil (:dynamicRegistration :symbolKind))