diff options
author | Alexander Konstantinov <akonst89+gitlab@gmail.com> | 2018-08-02 23:33:17 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2018-11-12 02:47:59 +0000 |
commit | c5cf86585d6948db36a2bdca4444682e9a8a36ad (patch) | |
tree | a0886ea830996292f1ac578c56115b6b5e3da33b | |
parent | f2f63bdd2292d1f74748a880f4408de2c306201d (diff) | |
download | geiser-c5cf86585d6948db36a2bdca4444682e9a8a36ad.tar.gz geiser-c5cf86585d6948db36a2bdca4444682e9a8a36ad.tar.bz2 |
Support 'quickhelp-string command for company-quickhelp
-rw-r--r-- | elisp/geiser-company.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/elisp/geiser-company.el b/elisp/geiser-company.el index 6108241..f32450b 100644 --- a/elisp/geiser-company.el +++ b/elisp/geiser-company.el @@ -54,6 +54,15 @@ (geiser-doc--render-docstring ds symbol module impl) (current-buffer))))) +(defun geiser-company--docstring (id) + (let* ((module (geiser-eval--get-module)) + (symbol (make-symbol id)) + (ds (geiser-doc--get-docstring symbol module))) + (and ds + (listp ds) + (concat (geiser-autodoc--str* (cdr (assoc "signature" ds))) + "\n\n" + (cdr (assoc "docstring" ds)))))) (defun geiser-company--location (id) (ignore-errors @@ -116,6 +125,7 @@ ('candidates (geiser-company--candidates arg)) ('meta (geiser-company--doc arg)) ('doc-buffer (geiser-company--doc-buffer arg)) + ('quickhelp-string (geiser-company--docstring arg)) ('location (geiser-company--location arg)) ('sorted t))) (defun geiser-company--setup-company (enable) |