-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Hi!
The popupinfo can be triggered manually via the command
This question depends on the backend. There are multiple sources of documentation. The backend can add to I am not aware of an existing mechanism to synchronize these documentation sources, but of course this can be done with some Elisp hacking, creating some adapters. |
Beta Was this translation helpful? Give feedback.
-
|
Check this related comment and function from ;; FIXME: Support for Company brings in features which straddle eldoc.
;; We should consolidate this, so that major modes can provide all that
;; data all at once:
;; - a function to extract "the reference at point" (may be more complex
;; than a mere string, to distinguish various namespaces).
;; - a function to jump to such a reference.
;; - a function to show the signature/interface of such a reference.
;; - a function to build a help-buffer about that reference.
;; FIXME: Those functions should also be used by the normal completion code in
;; the *Completions* buffer.
(defun elisp--company-doc-buffer (str)
(let ((symbol (intern-soft str)))
;; FIXME: we really don't want to "display-buffer and then undo it".
(save-window-excursion
;; Make sure we don't display it in another frame, otherwise
;; save-window-excursion won't be able to undo it.
(let ((display-buffer-overriding-action
'(nil . ((inhibit-switch-frame . t)))))
(ignore-errors
(cond
((fboundp symbol) (describe-function symbol))
((boundp symbol) (describe-variable symbol))
((featurep symbol) (describe-package symbol))
((facep symbol) (describe-face symbol))
(t (signal 'user-error nil)))
(help-buffer))))))So (defun my/elisp-docs (cb &rest r)
(when-let ((sym (symbol-at-point))
(buf (elisp--company-doc-buffer (symbol-name sym))))
(funcall cb (with-current-buffer buf (buffer-string)) '(:thing "ELDOCS") )))
(add-to-list (make-local-variable 'eldoc-documentation-functions) 'my/elisp-docs)Then |
Beta Was this translation helpful? Give feedback.




You can always look for the
:company-doc-bufferfunction. For example, foreglot, it is:I suppose if you wanted a generic way to do this, yo…