Skip to content

eglot only displays the first line of the doc string provided by LSP server #1467

Answered by joaotavora
zino23 asked this question in Q&A
Discussion options

You must be logged in to vote

You should use something like this (taken from that discussion):

(defun my/special-eglot-hover-function (cb)
  "Same as `eglot-hover-eldoc-function`, but throw away its short :echo cookie"
  (eglot-hover-eldoc-function (lambda (info &rest _ignore)
                                ;; ignore the :echo cookie that eglot-hover-eldoc-function offers
                                (funcall cb info))))

(add-hook
 'eglot-managed-mode-hook
 (lambda ()
   (setq-local eldoc-documentation-functions 
               (cl-substitute #'my/special-eglot-hover-function
                              'eglot-hover-eldoc-function 
                              eldoc-documentation-functions)))

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by joaotavora
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #1466 on November 26, 2024 15:57.