Skip to content

Commit f14fa86

Browse files
committed
Add an entry to the README to mention prettifying
1 parent 959bfce commit f14fa86

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,21 @@ on save:
129129
(setq rust-format-on-save t)
130130
```
131131

132+
### Prettifying
133+
134+
You can toggle prettification of your code by running `M-x
135+
prettify-symbols-mode`. If you'd like to automatically enable this
136+
for all rust files, add the following to your init.el.
137+
138+
```elisp
139+
(add-hook 'rust-mode-hook
140+
(lambda () (prettify-symbols-mode)))
141+
```
142+
143+
You can add your own prettifications to `rust-prettify-symbols-alist`.
144+
For example, to display `x.add(y)` as `x∔(y)`, simply add to your init
145+
file `(push '(".add" . ?∔) rust-prettify-symbols-alist)`.
146+
132147
### Running / testing / compiling code
133148

134149
The `rust-run`, `rust-test`, `rust-compile` and `rust-check` functions

0 commit comments

Comments
 (0)