editor-rs / vscode-rust

Rust for Visual Studio Code
MIT License
474 stars 62 forks source link

Provide a way to globally prevent addition of toolchain settings to global user configuration #339

Open raggi opened 7 years ago

raggi commented 7 years ago

Version of VSCode: 1.14.2 Version of the extension: 0.4.2 OS: OSX, Linux, Windows

Description:

I use vscode and rust across multiple operating systems with a shared user configuration. My user configuration is intentionally platform-portable. The rust toolchain selection causes me a constant frustration as it adds non-portable configuration to my global user configuration. I know that most users are happy with that behavior and feature, but it's a real pain for me. I would like some solution that at minimum I can set to prevent the plugin from ever trying to do that. Ideally for me, it would inherit the rustup default from the system, and only allow (not require) per project or per-system configuration in the editor.

KalitaAlexey commented 7 years ago

I was thinking about it since I have implemented it. I didn't think it matters much, but I did understand that some people wouldn't be happy with that. Currently I'm really busy, but I think it's easy to implement. I'd open a PR tomorrow.

What I'm going to change is that when the extension asks something and you chooses something, then the extension would ask where to save the settings: workspace or global. Let me know what you think about it.

raggi commented 7 years ago

That sounds really great. I also decided to open the hood and I was able to craft a patch that simply avoids doing any work if there's only a single default toolchain and it's nightly.

Thanks!

KalitaAlexey commented 7 years ago

It seems I cannot do that at the moment because of my bad architecture.

KalitaAlexey commented 7 years ago

I've opened #341 which describes what exactly isn't right at the moment. I think I'll open a PR to rework some part of it.