Skip to content
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

Is there any way to specify Rust analyzer config flags? #48

Open
Axel-Reactor opened this issue Feb 27, 2024 · 2 comments
Open

Is there any way to specify Rust analyzer config flags? #48

Axel-Reactor opened this issue Feb 27, 2024 · 2 comments

Comments

@Axel-Reactor
Copy link

Axel-Reactor commented Feb 27, 2024

I'm looking for a way to specify for example the equivalent of rust-analyzer.cargo.extraEnv in VSCode. I tried at some point to add this, but it seems less trivial than I thought.

Maybe with some pointers in the right direction I can implement this.

@parthopdas
Copy link
Member

Your offer to help implement is much appreciated. I used it for all my Rust coding & fix issues as they come up. Also released it as a community tool - while I am happy that people use it and like it, would love to have more volunteers like you. ❤️

Here are some pointers

  • This should be a folder level setting
  • Pass the environment var to rust-analyser.exe here LanguageClient.cs
  • Obtain the value of the env var from the settings file like here DebugLaunchTargetProvider.cs
  • We dont need an UI for this as I think this is a corner case, but good to support.

Let me know if you run into issues.

@parthopdas
Copy link
Member

@Axel-Reactor how's coming along? lmk if you need any help. I am on the project discord server as well for real time message.

When you get to this could you also please add similar ones for cargo doctest? A menu item like clippy/fmt as well as the configs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants