practicalli / spacemacs

Content for the book - Clojure Development with Spacemacs
https://practical.li/spacemacs
Creative Commons Attribution Share Alike 4.0 International
109 stars 33 forks source link

Configure CIDER indentation #253

Open practicalli-johnny opened 4 years ago

practicalli-johnny commented 4 years ago

Some libraries will extend the Clojure language with macros but these will not be recognised by Cider intention rules.

Use the clojure mode variable clojure-defun-indents to use the same indent rule as an existing part of the Clojure language.

(put-clojure-indent 'some-symbol :defn)  

This can be added to a . dir-locals.el for a specific problem or added to .spacemacs for all projects.

Can be added as a Clojure layer variable or in the dotspacemacs/user-config section of .spacemacs