From c2a0c1327758ed00d87f2536e4c6bbbeab7b395f Mon Sep 17 00:00:00 2001 From: nokaa Date: Tue, 27 Sep 2016 00:57:36 -0500 Subject: Add info to enable rustfmt --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'README.md') 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 -- cgit v1.2.3 From 7f7b2ac38e419a1398d68b75bc25f5fa092e0152 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 11 Apr 2017 10:43:42 -0400 Subject: mention keybinding for rustfmt --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 6067dfd..5da3b1c 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ you set the environment variable EMACS to a program that runs emacs. ### Formatting with [rustfmt][rfmt] The `rust-format-buffer` function will format your code with -[rustfmt][rfmt] if installed. +[rustfmt][rfmt] if installed. By default, this is bound to `C-c C-f`. Placing `(setq rust-format-on-save t)` in your `~/.emacs` will enable automatic running of `rust-format-buffer` when you save a buffer. -- cgit v1.2.3