Skip to content

virgiliolino/my-emacs-for-rust

Repository files navigation

Working heavily with Visual Studio Code and RUST I found some limitations about this IDE. Or better about its integration with the rust lsp-mode. So I switched back to my previous editor, added a couple of improvements, it is just amazing.

I’m pushing my ideal configuration so that in the future I don’t loose it. Most of the things you find here are taken from the amazing:

https://github.com/rksm/emacs-rust-config

I did some changes, put some config together in order to help me start faster on a new configuration. In order to make it work clone to a specific folder:

git clone [email protected]:virgiliolino/my-emacs-for-rust.git ~/resources-emacs

then start with ~/resources-emacs/emacs.sh

Why I’m not just overwriting the original .emacs.d folder? Well I personally like to try it fast if everything works fine.

.emacs.d config for Rust

This accompanies my “Configuring Emacs for Rust development” blog post.

It uses rust-anlyzer via rustic, lsp-mode, and lsp-ui-mode and also makes use of company, flycheck, and yasnippet. Among those features you get are

  • Navigating the source code (go to to implementation, list references of symbols, outline structure of a file)
  • Code completion (“intellisense”)
  • Code snippets
  • Highlighting errors and warnings inline
  • Apply code fixes and refactorings
  • Automatically import definitions if necessary (such as Traits)
  • Code formatting with rustfmt
  • Building & running other cargo commands

The actual configuration lives in init.el. Feel free to copy and paste as you see fit.

emacs -q --load "/resources-emacs/standalone.el"

License

MIT licensed

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •