0

When I have my pointer over a typescript method I get the signature of the method at the bottom of my screen. I assume this is done by tide and eldoc, but I could be wrong.

I like getting the signature, but I would also like to get the documentation of the method. If I run M-x tide-documentation-at-point it picks up the full documentation, but it looks like the echo bar(?) is just showing the first line.

is this possible to fix so that I always get the full documentation?

doc

munHunger
  • 125
  • 3

1 Answers1

1

If you want this

Full documentation in tide-mode (uses eldoc-box for display)`

Full documentation in tide-mode (uses `eldoc-box for display)

instead of this

Short documentation in tide-mode (uses`eldoc-box for display)

Short documentation in tide-mode (uses`eldoc-box for display)

use this

(defun tide-eldoc-function ()
  (unless (member last-command '(next-error previous-error))
    (if (tide-method-call-p)
        (tide-command:signatureHelp #'tide-eldoc-maybe-show)
      (when (looking-at "\\s_\\|\\sw")
        (tide-command:quickinfo
         (tide-on-response-success-callback response (:ignore-empty t)
           (tide-eldoc-maybe-show
        (tide-construct-documentation (plist-get response :body))))))))
  nil)

instead of this


(defun tide-eldoc-function ()
  (unless (member last-command '(next-error previous-error))
    (if (tide-method-call-p)
        (tide-command:signatureHelp #'tide-eldoc-maybe-show)
      (when (looking-at "\\s_\\|\\sw")
        (tide-command:quickinfo
         (tide-on-response-success-callback response (:ignore-empty t)
           (tide-eldoc-maybe-show (tide-doc-text (plist-get response :body))))))))
  nil)

That is ... tide-eldoc-maybe-show should receivetide-construct-documentation (and not tide-doc-text)


Irrespective of HOW you display the documentatio--Demo of eldoc-box--the suggestion here will work. If minibuffer is not showing full information--it is there, trust me---then you may have to resize the minibuffer yourself.