Using emacs as a Rust IDE

Turns out I don’t like Helix very much. The problem? My fingers know emacs. I hate emacs, but it is what my fingers know.

So I decided to figure out how to get emacs to be a Rust IDE. This was made a little tricky because I had attempted to do so a few years ago, when things were rougher, and the solution was to start over and not try to fix the old. Luckily I do not customize emacs a bunch, so starting over isn’t such a problem. I am not going to get into the details of how I did it, but I installed:

  • rust-analyzer
  • eglot
  • lsp-mode
  • lsp-ui
  • company
  • lsp-treemacs
I don’t know that that be a sensible collection, but they do do some nice stuff. This is really a cheat-sheet for myself, but I put it in public just in case anyone else finds it useful.
(This is a work-in-progress.)
  • mouse over something that has a definition and a popup should appear
  • M-. to see something’s definition
  • M-? to search for occurrences
  • M-, to navigate backwards
  • start typing and auto completion options should appear
  • M-x eglot- TAB to see various commands
  • M-x rust-run-clippy
  • right mouse
  • note the Flymake menu
©2024 Kent Borg

Posted

in

by

Tags: