From 0e74a68e489b5964322c610e066eb8a96e083be3 Mon Sep 17 00:00:00 2001 From: Alexander Konstantinov Date: Thu, 2 Aug 2018 23:33:17 +0000 Subject: Support 'quickhelp-string command for company-quickhelp --- elisp/geiser-company.el | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) -- cgit v1.2.3