Skip to content

Commit c2a0c13

Browse files
committed
Add info to enable rustfmt
1 parent 1587839 commit c2a0c13

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
`rust-mode` makes editing [Rust](http://rust-lang.org) code with Emacs
55
enjoyable. `rust-mode` requires Emacs 24 or later.
66

7+
## Installation
8+
79
### Manual Installation
810

911
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
6466
You can use `run_rust_emacs_tests.sh` to run them in batch mode, if
6567
you set the environment variable EMACS to a program that runs emacs.
6668

69+
## Features
70+
71+
### Formatting with [rustfmt][rfmt]
72+
73+
The `rust-format-buffer` function will format your code with
74+
[rustfmt][rfmt] if installed.
75+
76+
Placing `(setq rust-format-on-save t)` in your `~/.emacs` will enable automatic
77+
running of `rust-format-buffer` when you save a buffer.
78+
79+
[rfmt]: https://crates.io/crates/rustfmt/
80+
6781
## License
6882

6983
`rust-mode` is distributed under the terms of both the MIT license and the

0 commit comments

Comments
 (0)