Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jbuckmccready opened this issue Jul 17, 2024 · 3 comments
Closed

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

jbuckmccready opened this issue Jul 17, 2024 · 3 comments
Labels
enhancement New feature or request upstream wontfix This will not be worked on

Comments

@jbuckmccready
Copy link

jbuckmccready commented Jul 17, 2024

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: #334 but from what I can tell the way things are working it's all or nothing, with these being the only possibilities:

  • enable clippy and run clippy on save
  • disable clippy entirely (cannot run manually) with only check on save
  • disable on save entirely and then run check or clippy manually via flyCheck

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

@jbuckmccready jbuckmccready added the enhancement New feature or request label Jul 17, 2024
@mrcjkb
Copy link
Owner

mrcjkb commented Jul 17, 2024

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.

@mrcjkb mrcjkb closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2024
@mrcjkb mrcjkb added wontfix This will not be worked on upstream labels Jul 17, 2024
@jbuckmccready
Copy link
Author

jbuckmccready commented Jul 18, 2024

mfussenegger/nvim-lint#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
Copy link
Owner

mrcjkb commented Jul 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants