chrm
chrm

Reputation: 1288

Custom indentation in Clojurescript and Cider for 3rd party macro

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?

Upvotes: 0

Views: 89

Answers (1)

glts
glts

Reputation: 22734

This can be configured in clojure-mode (a dependency of CIDER), documentation is here.

For example, (put-clojure-indent 'async 1).

Upvotes: 1

Related Questions