Skip to content

Touch up signature faces #4608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -5797,7 +5797,10 @@ RENDER-ALL - nil if only the signature should be rendered."
(list :position (point)
:background-color (face-attribute 'lsp-signature-posframe :background nil t)
:foreground-color (face-attribute 'lsp-signature-posframe :foreground nil t)
:border-color (face-attribute 'font-lock-comment-face :foreground nil t))))
:border-color (face-attribute (if (facep 'child-frame-border)
'child-frame-border
'internal-border)
:background nil t))))
(posframe-hide " *lsp-signature*")))

(defun lsp--handle-signature-update (signature)
Expand Down Expand Up @@ -5855,6 +5858,11 @@ It will show up only if current point has signature help."
(list lsp-signature-doc-lines))))
(lsp-signature-activate))

(defface lsp-signature-highlight-function-argument
'((t :inherit eldoc-highlight-function-argument))
"The face to use to highlight function arguments in signatures."
:group 'lsp-mode)

(defun lsp--signature->message (signature-help)
"Generate eldoc message from SIGNATURE-HELP response."
(setq lsp--signature-last signature-help)
Expand Down Expand Up @@ -5900,7 +5908,7 @@ It will show up only if current point has signature help."
(end (if (stringp selected-param-label)
(+ start (length selected-param-label))
(cl-second selected-param-label))))
(add-face-text-property start end 'eldoc-highlight-function-argument nil label)))
(add-face-text-property start end 'lsp-signature-highlight-function-argument nil label)))
(concat prefix label method-docs))))

(defun lsp-signature ()
Expand Down
Loading