12

cider-doc to Clojure, The Essential Reference

 4 years ago
source link: https://www.eigenbahn.com/2020/06/04/emacs-clojure-essential-ref
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

cider-doc to Clojure, The Essential Reference

June 4, 2020

The Clojure Standard Library

Clojure’s standard library (aka the Core Library) is well thought-of and a pleasure to use.

But it’s pretty massive with around 700 functions and macros provided1, some of them having several (potentially tricky) use-cases and ways to combine them.

Moreover their documentation tend to be very concise, working more like little refreshers.

A step up is to use ClojureDocs and its user-provided examples.

A proper reference

I stumbled upon Clojure, The Essential Reference2, a book that aims at being a proper reference to the Core Library, with exhaustive descriptions and examples.

It has become my go-to reference for getting the specificities of core functions and macros.

Jump to documentation from within Emacs

Emacs and CIDER provide convenience commands to jump to the documentation of a symbol:

  • cider-doc: Show the docstring of the symbol (+ related symbols)
  • cider-clojuredocs and cider-clojuredocs-web: Same but use ClojureDocs as a source,

I quickly wanted to have a similar capability with Clojure, The Essential Reference, thus I started writing a package.

Sadly I didn’t find any programmatic symbol index I could parse. So I decided to make one with semi-automated parsing of the book’s Table of Content.

Introducing new package: clojure-essential-ref.

I you find anything missing, don’t hesitate to suggest corrections with tickets or PRs.

Notes

  1. For comparison, C’s provides half of that

  2. It’s not free. A limited amount of content can be freely consulted each day in the linked online version, though. 

Tagged #clojure, #emacs.



Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK