Here is the link to my emacs configuration for Rust: https://github.com/CSRaghunandan/.emacs.d/blob/master/setup-files/setup-rust.el
Some useful features:
1. Toggle the mutability of a variable at point
2. Toggle the public visibility of the function at point
3. Convert the vector expression at point to slice foo -> &foo[..]
4. Run the test at point
5. have a local playground for trying out rust snippets
6. automatically format the file with Rustfmt upon saving
7. Shortcuts for executing all cargo commands
8. linting using rustc error + warning messages
9. Autocomplete and jump to definition of variables, functions, types, etc. using Racer
Regards,
Raghunandan
Very nifty and interesting. Thanks so much for sharing, 'o wizard of emacs' !
setup-rust.el file contains reference to the following
https://github.com/rust-lang/rust-mode
https://github.com/flycheck/flycheck-rust
https://github.com/kwrooijen/cargo.el
https://github.com/racer-rust/emacs-racer
Could you please share your thoughts about how the variables and functions are accessed when multiple emacs lisp files are referenced ?
This would help folks, with exploring further.
warm regards
Saifi.
No need to worry about the elisp files. Just copy over the below lines to the init file: ~/.emacs or ~/.emacs.d/init.el . (you might need to create the file if they don't exist):
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
(package-initialize)
(unless (package-installed-p 'use-package) ; unless it is already installed
(package-refresh-contents) ; updage packages archive
(package-install 'use-package)) ; install the latest version of use-package
(eval-when-compile (require 'use-package))
(setq use-package-always-ensure t)
And copy over the contents of setup-rust.el to your init file (either of the two files I mentioned above) and open emacs. It should automatically download all dependencies and your Rust setup is ready :)
This is cool.
Is there something similar to this for vi or zile ?
--
https://meetup.com/rustox
---
You received this message because you are subscribed to a topic in the Google Groups "Rust Bangalore Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rustox/M_uWStsJFZc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rustox+unsubscribe@googlegroups.com.
To post to this group, send email to rus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.