Welcome! Please see the About page for a little more info on how this works.

0 votes
in Tools by

I use the async macro in Clojurescript

(:require
 [cljs.test :refer-macros [async deftest is testing run-tests]]

and Cider wants to indent it like this

(async done
       (go

The Cider manual only talks about custom indentation for 1st party macros

https://cider.readthedocs.io/en/latest/indent_spec/
https://cider.readthedocs.io/en/latest/configuration/indentation/

How do I tell Ciderto use {:style/indent 1} for a 3rd party macro in Clojurescript?

1 Answer

+2 votes
by
selected by
 
Best answer

The indentation is actually performed by clojure-mode, not by Cider. I believe Cider simply adds the feature that it can read meta to configure clojure-mode indentation.

Otherwise, you can just configure indent in Emacs as described in clojure-mode's documentation: https://github.com/clojure-emacs/clojure-mode/blob/master/README.md#indentation-of-macro-forms

...