eglot: Support signature labels without a function name

* lisp/progmodes/eglot.el (eglot--sig-info): Support signature labels
without a function name.  (Bug#58777)

Copyright-paperwork-exempt: yes
This commit is contained in:
Michal Dubiel 2022-10-23 19:54:31 +02:00 committed by Stefan Kangas
parent 4ccc385ab1
commit 9d334f558a

View file

@ -2934,7 +2934,7 @@ for which LSP on-type-formatting should be requested."
(let ((active-param (or activeParameter sig-help-active-param))
params-start params-end)
;; Ad-hoc attempt to parse label as <name>(<params>)
(when (looking-at "\\([^(]+\\)(\\([^)]+\\))")
(when (looking-at "\\([^(]*\\)(\\([^)]+\\))")
(setq params-start (match-beginning 2) params-end (match-end 2))
(add-face-text-property (match-beginning 1) (match-end 1)
'font-lock-function-name-face))