Difference between revisions of "Rust"
Jump to navigation
Jump to search
(→rust-mode: navigation by semantics (?)) |
|||
Line 3: | Line 3: | ||
= rust-mode = | = rust-mode = | ||
− | [https://github.com/rust-lang/rust-mode rust-mode] (in [[MELPA]]) offers syntax highlighted, code formatting, [[Imenu]] support, | + | [https://github.com/rust-lang/rust-mode rust-mode] (in [[MELPA]]) offers: |
+ | |||
+ | * syntax highlighted, | ||
+ | * '''code formatting''', optionally automatic, | ||
+ | * [[Imenu]] support, | ||
+ | * navigation by semantics (go to the beginning or end of the current defun), (see also [[helm-swoop]], [[helm-ag]], [[tags]],…) | ||
+ | * '''playpen''' helpers (send the selected code to play.rust-lang.org), | ||
+ | * … | ||
In Debian testing and unstable you can also install it with <code>apt install elpa-rust-mode</code> (but the MELPA way is prefered). | In Debian testing and unstable you can also install it with <code>apt install elpa-rust-mode</code> (but the MELPA way is prefered). |
Revision as of 14:44, 22 May 2017
Let's setup Emacs for Rust development, shall we ?
rust-mode
- syntax highlighted,
- code formatting, optionally automatic,
- Imenu support,
- navigation by semantics (go to the beginning or end of the current defun), (see also helm-swoop, helm-ag, tags,…)
- playpen helpers (send the selected code to play.rust-lang.org),
- …
In Debian testing and unstable you can also install it with apt install elpa-rust-mode
(but the MELPA way is prefered).
Code formatting with rustfmv
Formatting is also provided by this mode. If you want auto formatting everytime you save a buffer, put this in your Init File:
(setq rust-format-on-save t)