vfclists · 2022-12-11 23:12
I'm looking for some kind of utility that can present an overlay that displays the parameter names when the mouse hovers over a function invocation, with optional parameter descriptions.
One feature would be to invoke a function that replaces a function call with an intermediate function that takes the named parameters, presenting a dialog where you enter the parameters.
The idea is not to replace the function itself but use some kind generic function that can do it for any function.
eg if a function defined as `(defun dofunc a b c)` it gets replaced by `(param-call 'dofunc :a a-param :b b-param c: c-param)` and presents a dialog for it.
Any such thing in the Emacs universe?
andyjda · 2022-12-11 23:34
It's not exactly what you described, but I think `eldoc-mode` fits this purpose.
From the doc-string:
>When enabled, the echo area displays information about a function or variable in the text where point is. If point is on a documented variable, it displays the first line of that variable’s doc string. Otherwise it displays the argument list of the function called in the expression point is on.
It only displays the argument-names, but in my experience those are usually pretty descriptive, and if more info is needed, `C-h f` (aka `describe-function`) is usually the best approach.
​
(This is assuming you want this feature for Emacs-Lisp. If you want it for other languages, I think each language will have its own solution, and an LSP-server is probably a good way to get it)