Is rust-analyzer
working on the wasmtime
repo? Doesn't seem to be working for me on VSCode. Compile errors arent reported at all, but hundreads of clippy warnings are
It's working at least for me and I know for a number of the other contributors; I'm using it under emacs with eglot
Are you able to see logs or output? maybe it's missing some configuration or something?
Changing the rust-analyer command from cargo clippy
to cargo check
seems to fix it
I'm guessinng wasmtime doesnt use clippy, since there are hundreds of clippy warnings?
Ah, yeah, actual typechecking is what you want
we don't use clippy; it's overly opinionated about a lot of things and suggests refactors that don't make sense, or actively make code worse
(that's my opinion at least, may be slightly spicy)
Yeah, the pedantic
warnings are overly, well, pedantic. But the default warnings can be pretty helpful - eg useless clones or borrows
some of them are helpful, but even the default aren't all great IMO
one thing I've never figured out is how to tell rust-analyzer which cargo features to enable or disable from emacs via lsp-mode
Oh, yeah, that one's really annoying; if I'm working on something that's under a feature and not on by default, sometimes I just add it to the default feature set (locally, uncommitted) to make LSP work
Regarding Clippy: perhaps it would help to add a clippy.toml file which disables the opinionated lints. I agree with @kmeakin that some of the lints are quite helpful.
Err, nevermind the clippy.toml idea. I just noticed this in the Clippy docs: Note: The configuration file is unstable and may be deprecated in the future.
you can ignore them with #![allow(...)]
in lib.rs
. But you have to repeat that for every crate
Last updated: Dec 23 2024 at 13:07 UTC