diff options
| author | Christophe Troestler <Christophe.Troestler@umons.ac.be> | 2021-12-26 19:21:01 +0100 |
|---|---|---|
| committer | Christophe Troestler <Christophe.Troestler@umons.ac.be> | 2021-12-26 19:21:01 +0100 |
| commit | f14fa86a5c0a3b8563a24437549693ee07b9a95f (patch) | |
| tree | 6216e90df44fd2087c57a72b1ebc58584570b777 | |
| parent | 959bfce215c342c83d72650b2b35201de263edfe (diff) | |
| download | rust-mode-f14fa86a5c0a3b8563a24437549693ee07b9a95f.tar.gz | |
Add an entry to the README to mention prettifying
| -rw-r--r-- | README.md | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 |
