Vim and Rust in 2019

Posted on Fri 18 January 2019 in tools

I've been using Vim as my primary editor for a few months now. Recently I wanted to revisit some project work in Rust, but I hadn't setup any tooling in Vim for rust yet. The first couple of hits I got on Google were great resources that I'll provide links to, but they were also over a year old, so while using them as a starting point I'm documenting my setup since some things have changed from 2017.

What I'm using

Core Installs: - Rust with rustup - Racer

Autocomplete: - YouCompleteMe

Language Server Protocol - vim-lsp - RLS - Rust Language Server

So far this has been a fairly pain free experience. As I use this (and vim) more I will likely add some updates related to packaging, compiling and debugging in Vim, but for now these are the tools that got me started. One thing to note is that I recommend installing in the order above and following the install directions (especially for the lsp) since those appear to have made some QoL changes in the last year.

My final .vimrc is on GitLab along with my install scripts that contain a section for Rust and Vim.

Source Articles: