Open MinaMatta98 opened 1 year ago
Ok,
I seem to have gotten a solution.
It is possible that the previous tooling that I was using prior to using your version of rust-analyzer was incompatible with the new configuration.
Running cargo-clean
along with adding the following lines within my init.lua, seems to have fixed the issue:
server = {
on_attach = on_attach,
capabilities = require("cmp_nvim_lsp").default_capabilities(),
-- standalone = true,
settings = {
["rust-analyzer"] = {
-- enable clippy on save
checkOnSave = {
command = "clippy",
extraArgs = { "--all", "--", "-W", "clippy::all" },
},
rustfmt = {
extraArgs = { "+nightly" },
},
cargo = {
loadOutDirsFromCheck = true,
},
procMacro = {
enable = true,
},
},
},
Hello,
Firstly, thank you for the outstanding plugin.
I have been running into an issue where there is a lack of diagnostic support. For example, refer to line 61 of the example below, where a is initialized as a boolean value, but passed into std::fs::File::open(), which expects a File struct. Of course, this is unacceptable, but rust-analyzer does not show any errors.
Note that this is with the rocket crate, which expects nightly.
This is not standard. For example, where there is no macro's, I get the following:
The following is my configuration:
If you have time, I would appreciate some support. If I do come across a solution or implement one myself, I will share it in this support thread.
Again, thank you for the plugin!!