Skip to content

Instantly share code, notes, and snippets.

@TatianaJin
Last active August 5, 2022 18:18
Show Gist options
  • Save TatianaJin/0057f6425865dc9750d3f5d6645bf7bc to your computer and use it in GitHub Desktop.
Save TatianaJin/0057f6425865dc9750d3f5d6645bf7bc to your computer and use it in GitHub Desktop.
Nvim configuration for Rust dev
" Run the shell command to install vim-plug
" sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
" download the rust-analyzer binary or build from sources (if the binary requires a newer glibc than available locally)
" following the guide https://rust-analyzer.github.io/manual.html#installation
call plug#begin()
Plug 'rust-lang/rust.vim'
Plug 'dense-analysis/ale'
call plug#end()
let g:rustfmt_autosave = 1
let g:ale_completion_enabled = 1
" use rust analyzer for ALE
let g:ale_linters = {'rust': ['analyzer', 'rustfmt']}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment