Skip to content

Commit e178115

Browse files
authored
Touch up signature faces (#4608)
* Allow customization of signature function argument highlight * Use default child frame border face
1 parent 1ddd70a commit e178115

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lsp-mode.el

+10-2
Original file line numberDiff line numberDiff line change
@@ -5799,7 +5799,10 @@ RENDER-ALL - nil if only the signature should be rendered."
57995799
(list :position (point)
58005800
:background-color (face-attribute 'lsp-signature-posframe :background nil t)
58015801
:foreground-color (face-attribute 'lsp-signature-posframe :foreground nil t)
5802-
:border-color (face-attribute 'font-lock-comment-face :foreground nil t))))
5802+
:border-color (face-attribute (if (facep 'child-frame-border)
5803+
'child-frame-border
5804+
'internal-border)
5805+
:background nil t))))
58035806
(posframe-hide " *lsp-signature*")))
58045807

58055808
(defun lsp--handle-signature-update (signature)
@@ -5857,6 +5860,11 @@ It will show up only if current point has signature help."
58575860
(list lsp-signature-doc-lines))))
58585861
(lsp-signature-activate))
58595862

5863+
(defface lsp-signature-highlight-function-argument
5864+
'((t :inherit eldoc-highlight-function-argument))
5865+
"The face to use to highlight function arguments in signatures."
5866+
:group 'lsp-mode)
5867+
58605868
(defun lsp--signature->message (signature-help)
58615869
"Generate eldoc message from SIGNATURE-HELP response."
58625870
(setq lsp--signature-last signature-help)
@@ -5902,7 +5910,7 @@ It will show up only if current point has signature help."
59025910
(end (if (stringp selected-param-label)
59035911
(+ start (length selected-param-label))
59045912
(cl-second selected-param-label))))
5905-
(add-face-text-property start end 'eldoc-highlight-function-argument nil label)))
5913+
(add-face-text-property start end 'lsp-signature-highlight-function-argument nil label)))
59065914
(concat prefix label method-docs))))
59075915

59085916
(defun lsp-signature ()

0 commit comments

Comments
 (0)