[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode f14fa86a5c 2/3: Add an entry to the README to me
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode f14fa86a5c 2/3: Add an entry to the README to mention prettifying |
Date: |
Sun, 26 Dec 2021 13:58:24 -0500 (EST) |
branch: elpa/rust-mode
commit f14fa86a5c0a3b8563a24437549693ee07b9a95f
Author: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Commit: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Add an entry to the README to mention prettifying
---
README.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/README.md b/README.md
index 46c48ea93b..e20d7e4f20 100644
--- a/README.md
+++ b/README.md
@@ -129,6 +129,21 @@ on save:
(setq rust-format-on-save t)
```
+### Prettifying
+
+You can toggle prettification of your code by running `M-x
+prettify-symbols-mode`. If you'd like to automatically enable this
+for all rust files, add the following to your init.el.
+
+```elisp
+(add-hook 'rust-mode-hook
+ (lambda () (prettify-symbols-mode)))
+```
+
+You can add your own prettifications to `rust-prettify-symbols-alist`.
+For example, to display `x.add(y)` as `x∔(y)`, simply add to your init
+file `(push '(".add" . ?∔) rust-prettify-symbols-alist)`.
+
### Running / testing / compiling code
The `rust-run`, `rust-test`, `rust-compile` and `rust-check` functions