diff options
| author | brotzeit <brotzeitmacher@gmail.com> | 2021-12-26 19:24:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-26 19:24:38 +0100 |
| commit | eba544147aa6769f4f0e153e9f7373801dd2db89 (patch) | |
| tree | 2c3a43af7ece9eb5d1e7720d25eee79ac0237df1 /README.md | |
| parent | 65f96278b24b89c13e79b38a071a98824d108bb8 (diff) | |
| parent | f14fa86a5c0a3b8563a24437549693ee07b9a95f (diff) | |
| download | rust-mode-eba544147aa6769f4f0e153e9f7373801dd2db89.tar.gz | |
Merge pull request #429 from Chris00/prettify
Enable the use of prettify-symbols-mode
Diffstat (limited to 'README.md')
| -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 |
