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

Integrate with rustfmt #52

Merged
merged 9 commits into from
Nov 14, 2015
Merged

Conversation

IanConnolly
Copy link
Contributor

I took #49 and ran with it a bit as I want to get this over the line.

Differences:

  • New RustFmt command
  • We fill the location-list rather than the quickfix-list, due to location-list and RustFmt itself being buffer-local.
  • No more echo'ing of unparseable errors.
  • Documentation.
  • Misc code cleanup; safety.

Will also fix #43.

Thoughts @steveklabnik, @grncdr?

@rust-highfive
Copy link

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`.
Copy link

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).

Copy link
Contributor Author

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.

@steveklabnik
Copy link
Member

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 :)

@IanConnolly
Copy link
Contributor Author

Fixed said typo up.

Ready whenever you are @steveklabnik @grncdr :)

@grncdr
Copy link
Contributor

grncdr commented Nov 14, 2015

I have no preference for location list or quickfix. This looks great to me, nice work @IanConnolly 👍

@steveklabnik
Copy link
Member

Okay! Let's do it! Thank you both for all the work.

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.

Run rustfmt on save?
6 participants