summaryrefslogtreecommitdiffstats
path: root/vim/ftplugin/rust.vim
blob: 2e527e86cc6142e2ec938392c2e4413999a169e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
let b:ale_linters = { 'rust': ['rls'] }
let b:ale_rust_rls_toolchain = 'stable'
let b:ale_rust_rls_config = { 'rust': { 'clippy_preference': 'on' } }
let b:ale_fixers = { 'rust': ['rustfmt'] }
let b:ale_fix_on_save = 1

if filereadable("Cargo.toml")
    compiler cargo
    setlocal makeprg=cargo\ build
else
    setlocal makeprg=rustc\ %
endif