summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-02-16 04:57:45 +0000
committerbrian m. carlson <sandals@crustytoothpaste.net>2020-02-16 04:57:45 +0000
commit1632d57732603904711f5408445a16af281717c2 (patch)
tree5952d5c54861dfd4e5048adf9585a2d0aaa0a8a3
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 <sandals@crustytoothpaste.net>
-rw-r--r--vim/vimrc1
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()