summaryrefslogtreecommitdiff
path: root/cider-doc.el
diff options
context:
space:
mode:
authorChaitanya Koparkar <ckoparkar@live.in>2016-09-15 02:35:33 -0400
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2016-09-15 09:35:33 +0300
commit6d6595a06c3b075635b91540bd82a117db9a3f2f (patch)
tree20beaf5740d3ab591581077820e3a17eb21011be /cider-doc.el
parentc698df1c905127f190efee3403822b2b09a811c3 (diff)
[Fix #1769] Display fn spec in the doc buffers (#1833)
Diffstat (limited to 'cider-doc.el')
-rw-r--r--cider-doc.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/cider-doc.el b/cider-doc.el
index 40f0e075..667aab47 100644
--- a/cider-doc.el
+++ b/cider-doc.el
@@ -394,6 +394,7 @@ Tables are marked to be ignored by line wrap."
(javadoc (nrepl-dict-get info "javadoc"))
(super (nrepl-dict-get info "super"))
(ifaces (nrepl-dict-get info "interfaces"))
+ (spec (nrepl-dict-get info "spec"))
(clj-name (if ns (concat ns "/" name) name))
(java-name (if member (concat class "/" member) class))
(see-also (nrepl-dict-get info "see-also")))
@@ -455,6 +456,10 @@ Tables are marked to be ignored by line wrap."
(browse-url (button-get x 'url))))
(insert ".\n"))
(insert "\n")
+ (when spec
+ (emit "Spec: " 'font-lock-function-name-face)
+ (mapc (lambda (s) (insert s "\n")) spec)
+ (insert "\n"))
(if cider-docview-file
(progn
(insert (propertize (if class java-name clj-name)