-
Notifications
You must be signed in to change notification settings - Fork 107
feat: add zprint formatter for clojure #130
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
Conversation
7520bca
to
db75607
Compare
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.
Looks great! A few suggestions.
6ac19e2
to
95635c9
Compare
@dbarnett Thanks for the review. I've squashed the commits and this should be ready to merge unless you have any other concerns. |
If you pull #131 before this, then I'll rebase this PR to resolve the minor merge conflict |
Rebased to resolve merge conflict with #131 |
zprint unfortunately lacks the ability to format a range, so we implement `:FormatLines` by sending only the lines to be formatted. See kkinnear/zprint#122
@dbarnett In case this was lost in code review comments, I updated the tests to use fake I/O fully, and removed the zprint install from travis. Let me know if there's anything else... |
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.
LGTM! Thanks for bearing with me on the nitty gritty stuff. =)
|
||
"" | ||
" @section Recommended zprint mappings, mappings-zprint | ||
" @parentsection mappings |
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.
Note to self: Build a new vimdoc release. I just found that the @parentsection
directive isn't supported yet in the latest vimdoc 0.6.0 release.
This pull request adds a formatter for Clojure using zprint.
zprint unfortunately lacks the ability to format a range, so we implement
:FormatLines
by sending only the lines to be formatted. I've opened a PR to add range formatting to zprint, see kkinnear/zprint#122Doc is updated by vimdoc, with a special section
*codefmt-mappings-zprint*
suggesting an alternative mapping for top-level forms which depends on also having vim-sexp installed: