diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 10b6c0cc2ca..a4f859745e7 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -3128,14 +3128,12 @@ for which LSP on-type-formatting should be requested." (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)) - ;; Decide whether to add one-line-summary to signature line - (when (and (stringp documentation) - (string-match "[[:space:]]*\\([^.\r\n]+[.]?\\)" - documentation)) - (setq documentation (match-string 1 documentation)) - (unless (string-prefix-p (string-trim documentation) label) - (goto-char (point-max)) - (insert ": " (eglot--format-markup documentation)))) + ;; Insert documentation + (goto-char (point-max)) + (unless (null documentation) + (insert ": " (if (stringp documentation) + documentation + (eglot--format-markup documentation)))) ;; Decide what to do with the active parameter... (when (and active-param (< -1 active-param (length parameters))) (eglot--dbind ((ParameterInformation) label documentation)