mrcjkb / rustaceanvim

🦀 Supercharge your Rust experience in Neovim! A heavily modified fork of rust-tools.nvim
GNU General Public License v2.0
1.74k stars 67 forks source link

Run clippy via command only (not on save) #453

Closed jbuckmccready closed 3 months ago

jbuckmccready commented 3 months ago

Feature description

I'd like to be able to have only cargo check on save but still be able to run clippy via flyCheck manually (feeding results into lsp diagnostics).

I saw this: https://github.com/mrcjkb/rustaceanvim/discussions/334 but from what I can tell the way things are working it's all or nothing, with these being the only possibilities:

I want check on save, with flyCheck using clippy, e.g., :RustLsp flyCheck run clippy.

mrcjkb commented 3 months ago

Hey 👋

Something like that can't be implemented by this plugin. You'll have to request it in the rust-analyzer issues, although I don't think it would be implemented.

An way you could solve this would be to disable clippy in the rust-analyzer settings and use something like nvim-lint to run clippy checks on demand.

jbuckmccready commented 3 months ago

https://github.com/mfussenegger/nvim-lint/issues/256 😬

Thanks for response, awkward situation, was hoping to get the diagnostics fed into the lsp so I can use telescope to jump between them rather than running from command line and having to jump to file+line independent of telescope.

mrcjkb commented 3 months ago

It shouldn't be hard to contribute clippy support to nvim-lint:

was hoping to get the diagnostics fed into the lsp so I can use telescope to jump between them rather than running from command line and having to jump to file+line independent of telescope.

Both the LSP client and nvim-lint use the samevim.diagnostic API. So this shouldn't be an issue.