diff options
authorbrian m. carlson <>2020-02-16 04:57:45 +0000
committerbrian m. carlson <>2020-02-16 04:57:45 +0000
commit1632d57732603904711f5408445a16af281717c2 (patch)
parent96b7a33bd6391675909873c94c774ffb9901e4ed (diff)
vimrc: use clippy with ALE when available
By default, ALE uses cargo check to check Rust code. However, if enabled, it's possible to use cargo clippy, which not only checks for the standard errors and warnings, but other style checks as well. Since there's really no downside to this, enable it if we're using rustup and therefore have it available. Signed-off-by: brian m. carlson <>
1 files changed, 1 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 2420fb7..cb57334 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -627,6 +627,7 @@ let g:ale_fixers = {
\ 'rust': ['rustfmt'],
\ }
let g:ale_rust_rls_toolchain = ''
+let g:ale_rust_cargo_use_clippy = isdirectory(expand("$HOME") . '/.cargo')
"" Other language-specific setup.
call s:SetUpLanguageHooks()