-
Notifications
You must be signed in to change notification settings - Fork 10
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
Use stable toolchain for rust-analyzer on xtensa targets #69
Conversation
Apparently the difference this setting makes is using the proc-macro-server from the The Do you have an example for when using the |
Sorry, I should have added more detail when opening this. rust-analyzer doesn't seem to work at all on the In helix I get the following in the log:
And I can't add it with rustup.
I found this Reddit thread which suggested overriding the toolchain: https://www.reddit.com/r/rust/comments/13d2tls/rustanalyzer_and_toolchain_for_esp/ In this configuration rust-analyzer doesn't seem to run perfectly. It seems to not show all errors, but hover and go-to-definion and so on seem to work for the most part at least. But maybe I'm missing something. Someone in the Reddit thread suggested that it works in VSCode because it bundles rust-analyzer, but for me that doesn't seem to be the case (I think using the rust-analyzer builds from the VSCode plugin is optional). So maybe the issue doesn't affect everyone on the Someone also suggested symlinking rust-analyzer from stable into the esp toolchain, but I'd be a bit worried about that causing problems with Or is there a different way to get rust-analyzer working on the |
Thanks for the update! I'm using VSCode with the RA-plugin installed from the marketplace - there are always some minor problems, but it usually works. Can't say much (or anything) about Helix. Interestingly This doesn't seem to make anything worse so I would be fine with merging this (given it makes RA work for others) - but maybe worth to have this checked by another maintainer first. |
Sorry for the delay. I've been tinkering around a bit more and figured out some improvements. Adding this to check.extraEnv.RUSTUP_TOOLCHAIN = "esp" Doing the same in VSCode But then using go-to-definition for cargo.extraEnv.RUSTUP_TOOLCHAIN = "esp" I think because that env is used running I'll try updating the PR later today or tomorrow. |
Ok, I've made the adjustment. I've also updated the changelog (hope I did that right). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for your investigation and improving the RA config!
It seems that rust-analyzer doesn't support custom toolchains, but the documentation suggests adding an override such that rust-analzer runs on the stable toolchain: https://rust-analyzer.github.io/manual.html#toolchain.