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 | 0e74a68e489b5964322c610e066eb8a96e083be3 (patch) | |
tree | c2f16f77c21365ace4cd0e57ed2c9df69d55fbda /elisp | |
parent | 99fa2dbc2ef079babd68b513135e51c6d5991c96 (diff) | |
download | geiser-guile-0e74a68e489b5964322c610e066eb8a96e083be3.tar.gz geiser-guile-0e74a68e489b5964322c610e066eb8a96e083be3.tar.bz2 |
Support 'quickhelp-string command for company-quickhelp
Diffstat (limited to 'elisp')
-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) |