summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornokaa <nokaa@cock.li>2016-09-27 00:57:36 -0500
committernokaa <nokaa@cock.li>2016-09-27 00:57:36 -0500
commitc2a0c1327758ed00d87f2536e4c6bbbeab7b395f (patch)
treedd6e034fb3bdea0d670cf9f325bd1b2d470ff80e
parent1587839ba493b5ab98fb8415338172a9a22f224b (diff)
downloadrust-mode-c2a0c1327758ed00d87f2536e4c6bbbeab7b395f.tar.gz
Add info to enable rustfmt
-rw-r--r--README.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
index 57635d3..6067dfd 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,8 @@
`rust-mode` makes editing [Rust](http://rust-lang.org) code with Emacs
enjoyable. `rust-mode` requires Emacs 24 or later.
+## Installation
+
### Manual Installation
To install manually, check out this repository and add this to your
@@ -64,6 +66,18 @@ The file `rust-mode-tests.el` contains tests that can be run via
You can use `run_rust_emacs_tests.sh` to run them in batch mode, if
you set the environment variable EMACS to a program that runs emacs.
+## Features
+
+### Formatting with [rustfmt][rfmt]
+
+The `rust-format-buffer` function will format your code with
+[rustfmt][rfmt] if installed.
+
+Placing `(setq rust-format-on-save t)` in your `~/.emacs` will enable automatic
+running of `rust-format-buffer` when you save a buffer.
+
+[rfmt]: https://crates.io/crates/rustfmt/
+
## License
`rust-mode` is distributed under the terms of both the MIT license and the