Is there a package to get a popup of the documentation for the thing at the point?
Here's an example that flycheck uses.
Is there a package to get a popup of the documentation for the thing at the point?
Here's an example that flycheck uses.
Don't know what kind of documentation you want, I use the following to display a short summary of elisp function/variable's docstring with popup:
(defun chunyang-elisp-function-or-variable-quickhelp (symbol)
"Display summary of function or variable at point.
Adapted from `describe-function-or-variable'."
(interactive
(let* ((v-or-f (variable-at-point))
(found (symbolp v-or-f))
(v-or-f (if found v-or-f (function-called-at-point))))
(list v-or-f)))
(if (not (and symbol (symbolp symbol)))
(message "You didn't specify a function or variable")
(let* ((fdoc (when (fboundp symbol)
(or (documentation symbol t) "Not documented.")))
(fdoc-short (and (stringp fdoc)
(substring fdoc 0 (string-match "\n" fdoc))))
(vdoc (when (boundp symbol)
(or (documentation-property symbol 'variable-documentation t)
"Not documented as a variable.")))
(vdoc-short (and (stringp vdoc)
(substring vdoc 0 (string-match "\n" vdoc)))))
(and (require 'popup nil 'no-error)
(popup-tip
(or
(and fdoc-short vdoc-short
(concat fdoc-short "\n\n"
(make-string 30 ?-) "\n" (symbol-name symbol)
" is also a " "variable." "\n\n"
vdoc-short))
fdoc-short
vdoc-short)
:margin t)))))
Here is what it looks like: