The :RustAnalyzer config { cargo = { features = {"<feature name>"}}} doesn't working in rustc 1.95.0?
#1035
Replies: 2 comments
-
|
Hey 👋 This looks like a rust-analyzer issue.
|
Beta Was this translation helpful? Give feedback.
-
|
The suspicious line in your health output is this one: So when you switch back to Rust 1.90, you are also moving closer to the age of the rust-analyzer binary you have installed. That makes this look less like a rustaceanvim command issue and more like a rust-analyzer/toolchain mismatch. I would test these two things: which rust-analyzer
rust-analyzer --version
rustup which rust-analyzer
rustup run stable rust-analyzer --versionIf Neovim is picking up an older standalone / Mason / manually installed vim.g.rustaceanvim = {
server = {
cmd = { "rustup", "run", "stable", "rust-analyzer" },
default_settings = {
["rust-analyzer"] = {
cargo = {
features = { "your-feature" },
},
},
},
},
}That also tests the maintainer's point: if startup config works but Small syntax note: :RustAnalyzer config { cargo = { features = { "your-feature" } } }The command does not validate the table, so a shape that is accepted by Lua can still be ignored by rust-analyzer if it is not the config shape it expects. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
:h rustaceanvim.Description
I always use the
:RustAnalyzer config { cargo = { features = {"<feature name>"}}}command to enable the feature that I'm working on. Today I upgraded Rust usingrustup updateit updated to thestable-aarch64-apple-darwin unchanged - rustc 1.95.0version. After this, the:RustAnalyzer config { cargo = { features = {"<feature name>"}}}command stops working. The command doesn't give any error, but the autocompletion and documentation commands are not working on APIs under this specific feature, but the autocompletion and documentation are working on default APIs (which are not hidden under any feature flags). Then I again run therustup updateand get the following output:After I check the default toolchain
rustup defaulti gotstable-aarch64-apple-darwin (default). Then i change torustup default 1.90-aarch64-apple-darwinusingrustup default rustup default 1.90-aarch64-apple-darwinand try using:RustAnalyzer config { cargo = { features = {"<feature name>"}}}and this works.I don't know what went wrong with
stable-aarch64-apple-darwin unchanged - rustc 1.95.0?Example Code
Neovim version (nvim -v)
v0.12.2
Operating system/version
MacOS 26.4.1
Output of :checkhealth rustaceanvim
Beta Was this translation helpful? Give feedback.
All reactions