-
Notifications
You must be signed in to change notification settings - Fork 302
Integrate with rustfmt #52
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
I really enjoyed this feature from [vim-go](https://github.com/fatih/vim-go) so I copied it for rust & rustfmt.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
## Enabling autoformat | ||
|
||
This plugin can optionally format your code using [rustfmt][rfmt] every time a | ||
buffer is written. Simple put `let g:rust_fmt_autosave = 1` in your `.vimrc`. |
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.
Hi. I'm trying this out, and it works great!
Just a quick note: here you have rust_fmt_autosave
as the bool to check for autosave, but the lookup uses g:rustfmt_autosave
(note the extra underscore).
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.
Good catch! Missed that :) Will fix this evening.
This looks pretty great! Since @grncdr 's commits are still in there, I'd like their comments before merging. Seems like this is a good way to go, but want to make sure :) |
Fixed said typo up. Ready whenever you are @steveklabnik @grncdr :) |
I have no preference for location list or quickfix. This looks great to me, nice work @IanConnolly 👍 |
Okay! Let's do it! Thank you both for all the work. |
I took #49 and ran with it a bit as I want to get this over the line.
Differences:
RustFmt
commandRustFmt
itself being buffer-local.Will also fix #43.
Thoughts @steveklabnik, @grncdr?