Calling eldoc-message directly
(too old to reply)
Clément Pit-Claudel
2018-05-10 02:43:04 UTC
In that package, I use a server process to get information about the current
buffer. I can use it to asynchronously retrieve documentation about
identifiers, among other things. This pattern seems pretty common (I think
that's how tide, elpy, cider, and multiple other modes work).
Indeed async use is currently not supported.
Not sure how to best add support for sync-processing.
Ideally, we'd pass a "continuation" to the eldoc-documentation-function,
but that would break existing functions which wouldn't expect that extra arg.
We could pass that extra arg via a dynamically-scoped variable like
An alternative would be to allow eldoc-documentation-function to return
a function, which is then called with the continuation.
That would be nice. This model works pretty well in company-mode.