A simple popup to show colorized docstrings above point, for any function and resolved namespace. Also shows some basic summary statistics for functions and namespaces.
Caption: Point sitting on non-local function, showing colorized and resolved namespace, function name, parameters, docstring, and optional see-alsos.
You can see in the screenshots that the gray box is quick-peek at work inserting the documentation as an overlay.
This is a lot like cider-clojuredocs
but:
-
is lighter in that it only shows a bare minimum of info (no examples)
-
keeps you from switching to docs or source buffers to hunt for info
-
shows docstrings for even your own functions and namespaces, encouraging you to add more of them!
-
enables using shorter namespace aliases since their resolution is right at your fingertips
Install the dependencies:
Note: Cider is a huge dependency, but it is assumed that you've already bought into that. quick-peek is tiny and has none.
(add-to-list 'load-path "path to your clone of this")
(require 'clojure-docs-peek)
Invoke clojure-docs-peek-toggle
to open and close the peek.
Use universal argument (prefix C-u
) to include See also section.
I use this constantly and like to bind this to be really quick and
easy to use, so it's CD
(as a key-chord):
(key-chord-define-global "CD" 'clojure-docs-peek-toggle)
I'm sure this could be altered to depend on LSP rather than Cider.
Please let me know in a ticket if you have more ideas for getting other clojure documentation into popups.