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

Add support for format-edn middleware & fix #977 #978

Merged
merged 2 commits into from
Feb 17, 2015

Conversation

cichli
Copy link
Member

@cichli cichli commented Feb 16, 2015

I'm sure there's a better way to do cider--format-reindent. Originally I thought of indent-buffer after insertion, but that would only work for EDN.

Feedback welcome!

@bbatsov
Copy link
Member

bbatsov commented Feb 16, 2015

I'm sure there's a better way to do cider--format-reindent. Originally I thought of indent-buffer after insertion, but that would only work for EDN.

I'm definitely confused by it. :-) Will think a bit more on the subject tomorrow.

@cichli
Copy link
Member Author

cichli commented Feb 16, 2015

Basically, we know that any leading whitespace before the first char will be stripped, so start is definitely the position where the form will begin. So we just add start-column spaces to the start of every line after the first (in addition to the spaces already added by the formatting op).

@cichli
Copy link
Member Author

cichli commented Feb 16, 2015

This (along with the format-code commands) fixes #535 btw.

bbatsov added a commit that referenced this pull request Feb 17, 2015
Add support for format-edn middleware & fix #977
@bbatsov bbatsov merged commit 060817b into clojure-emacs:master Feb 17, 2015
@bbatsov
Copy link
Member

bbatsov commented Feb 17, 2015

👍

@cichli cichli deleted the format-edn branch February 17, 2015 23:34
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

Successfully merging this pull request may close these issues.

2 participants