Unable to enable features #397
Answered
by
mrcjkb
NicoElbers
asked this question in
Q&A
-
Hi, I've been wanting to enable some features for rust analyzer since greyed out code is kinda annoying. I've been told that enabling "all features" would make this magically work, but that hasn't been the case. I've tried the options that I've found, both Here is how I have rustaceanvim configured: {
"mrcjkb/rustaceanvim",
version = "^4", -- Recommended
lazy = false, -- This plugin is already lazy
init = function()
vim.g.rustaceanvim = {
tools = {
enable_clippy = true,
},
server = {
on_attach = utils.on_attach,
default_settings = {
["rust_analyzer"] = {
cargo = {
allFeatures = true,
features = "all",
loadOutDirsFromCheck = true,
runBuildScripts = true,
},
-- Add clippy lints for Rust
checkOnSave = {
allFeatures = true,
allTargets = true,
command = "clippy",
extraArgs = {
"--",
"--no-deps",
"-Dclippy::pedantic",
"-Dclippy::nursery",
"-Dclippy::unwrap_used",
"-Dclippy::enum_glob_use",
"-Wclippy::complexity",
"-Wclippy::perf",
},
},
procMacro = {
enable = true,
ignored = {
["async-trait"] = { "async_trait" },
["napi-derive"] = { "napi" },
["async-recursion"] = { "async_recursion" },
},
},
},
},
},
}
end,
}, |
Beta Was this translation helpful? Give feedback.
Answered by
mrcjkb
May 17, 2024
Replies: 1 comment 1 reply
-
Hey 👋 I think this is your issue: ["rust_analyzer"] = { should be ["rust-analyzer"] = { |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
NicoElbers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey 👋
I think this is your issue:
should be