-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feature: for all config values that override commands, canonicalize the provided path #13405
Comments
I am planning on adding proper server sided interpolation to our configs (or at least all |
Gotcha! I like that idea; it seems like it'll work for my use-case.
For my curiosity: is it because you'd like to minimize churn in the configs or is it because of a new stability policy? In either case, I'd be happy to test your implementation, provide feedback from hundreds of people and migrate them if/when breaking changes are made. Naively, it seems like an unstable flag that's passed to To step back to the original question: would y'all accept a PR that checks if the first argument provided to |
No our config is not stable, but we'll try to minimize breakages as much as possible (I already pushed for a major breakage to make it more uniform once and other client implementation maintainers were anything but happy, understandably so), and breaking the syntax for interpolation sounds even worse than renaming config keys. I don't like the |
Gotcha, that makes sense. If you'd like, I'd be happy to make an issue for the unstable flags proposal.
Yeah, I think this will resolve the immediate issue. Folks who are using other editors are largely on their own, so making them do config changes isn't an unreasonable demand. |
#13423 should allow you to set |
Substitute some VSCode variables in the VSCode client cc #13405
I believe we can close this issue since the vscode side does substitute userhome now |
(The way that I came across this issue was a confluence of weird BigCo constraints, the use of a virtualized file system, and me acting as a de-facto vendor for Rust Analyzer. I don't expect most people to encounter this in the first place.)
I've noticed a small inconsistency when working with config values that override commands: namely, the config value provided for
rust-analyzer.server.path
will trim the leading~
from the provided path, but the same will not occur forrust-analyzer.rustfmt.overrideCommand
(I assume the holds for every other overridable command in Rust Analyzer, but I haven't tested those other commands yet) . This means that I can't point every instance of Rust Analyzer used at my employer at the appropriaterustfmt
(or any other binary) inside of the monorepo, as providing the home directory-relative path torustfmt
results in atextDocument/formatting failed. Message: Failed to spawn
error being shown.If it's okay with y'all, I'd be happy to write a bit of code in the Rust Analyzer server itself to bring the existing behavior for
rust-analyzer.server.path
to all other config values that accept paths. I don't think it'll cause any issues for people who don't have weird setups like my employer does, but it'll certainly reduce my support burden. If nothing else, it might remove an inconsistency.Alternatives Considered
"${userHome}
instead of~/
. Unfortunately, variable interpolation is not supported inside of VS Code's settings (Support variables when resolving values in settings microsoft/vscode#2809).rustfmt
to the $PATH by default. This is feels a bit hacky and can mess with people'srustup
-managed toolchain, so I'd rather avoid this if I can.The text was updated successfully, but these errors were encountered: