Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indentation error #157

Closed
casens5 opened this issue Nov 11, 2024 · 1 comment
Closed

indentation error #157

casens5 opened this issue Nov 11, 2024 · 1 comment

Comments

@casens5
Copy link

casens5 commented Nov 11, 2024

i'm using v0.14.0. it seems that standard-clj corrects

(+ (+ 3 5)
(- 4 5))

or

(+ (+ 3 5)
        (- 4 5))

to

(+ (+ 3 5)
  (- 4 5))

where i would expect

(+ (+ 3 5)
   (- 4 5))
@oakmac
Copy link
Owner

oakmac commented Nov 11, 2024

This is a question of of "Rule 3" alignment.

If you want the nested form (- 4 5) to be vertically aligned under (+ 3 5), then provide the following to Standard Clojure Style:

(+ (+ 3 5)
   (- 4 5))

Otherwise you will get Fixed Indentation (ie: two spaces) as in your examples.

@casens5 casens5 closed this as completed Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants