Skip to content

Commit

Permalink
Add SignatureInformation activeParameter support.
Browse files Browse the repository at this point in the history
  • Loading branch information
brownts committed Dec 16, 2024
1 parent 7d8f232 commit d19f440
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lsp-protocol.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d19f440

Please sign in to comment.