-
Notifications
You must be signed in to change notification settings - Fork 18
Improve semantic indentation rules to be more consistent with cljfmt #67
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
Improve semantic indentation rules to be more consistent with cljfmt #67
Conversation
|
The proposal seems reasonable to me - from what I gather the essence here is that we want to treat differently forms depending on the position of their Might be a good idea to mention this somewhere in the README, and I'm also wondering if we should make this configurable like in Making this configurable is also need for CIDER to be able to insert indentation rules itself, based on forms indentation specs. |
a4b20f6 to
eb6841e
Compare
|
Thanks you for the review @bbatsov. I've refactored the code. It's less repetitive now and rules are customizable via |
README.md
Outdated
| custom rules as: | ||
|
|
||
| ```emacs-lisp | ||
| (setopt clojure-ts-semantic-indent-rules '(("are" . (:block 1)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to have several forms here, so it's clearer what the format is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be good to explain also the various block and inner values here, similar to how it's done in clojure-mode's docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've adapted some examples from clojure-mode documentation and added some explanation about the rules.
eb6841e to
5f4a4e1
Compare
5f4a4e1 to
874ff54
Compare
bbatsov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Example:
Before submitting a PR mark the checkboxes for the items you've done (if you
think a checkbox does not apply, then leave it unchecked):
M-x checkdocand fixed any warnings in the code you've written.Thanks!