How to use Clippy for warning about Shadowing in Neovim?

I'm trying to get Clippy running through Cargo using ALE in Neovim. Specifically, I just want a warning for if a variable gets shadowed. I know there are valid reasons for shadowing, I just don't like it from a readability perspective.

Regardless, I'm struggling with the documentation. How do I create a top-level clippy.toml which adds a warning for shadowing, and how do I get ALE's cargo integration to automatically use it? I don't even know how to set up a clippy.toml for that particular warning. Here's the relevant pieces of init.vim for rust+ale, and it's working, I just don't know if Clippy is being used / how to configure it.

let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'rust': ['rustfmt']
\ }

let g:ale_linters = {
\ 'rust': ['cargo', 'rustc']
\ }

I'm open to other options, such as using the Rust Language Server, if I could just find docs to help me configure them.

Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.