commit fa9fb0cbaa82eeb285975866a556aeadaa29b5c2
parent 7f2d031bec20151dacc8eb7e76c6e4f6dafc7607
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date: Fri, 28 Nov 2025 16:24:29 +0000
Bug 2002427 - Don't use a vscode-specific setting for rust dir. r=Standard8
rust-analyzer itself doesn't read this env var, so this works equally
well and works with other environments (I read the vscode settings from
my neovim set-up).
Differential Revision: https://phabricator.services.mozilla.com/D274400
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/docs/contributing/editors/vim.rst b/docs/contributing/editors/vim.rst
@@ -28,7 +28,7 @@ You also need to set some options to get full diagnostics:
.. code ::
- "rust-analyzer.server.extraEnv": {
+ "rust-analyzer.cargo.extraEnv": {
"CARGO_TARGET_DIR": "/path/to/objdir"
},
"rust-analyzer.vfs.extraIncludes": ["/path/to/objdir", "/optional/path/to/windows_rs_dir"],
diff --git a/python/mozbuild/mozbuild/backend/mach_commands.py b/python/mozbuild/mozbuild/backend/mach_commands.py
@@ -241,6 +241,7 @@ def setup_vscode_or_vscodium(ide, command_context, interactive):
"[javascript][javascriptreact][typescript][typescriptreact][json]",
"[javascript][javascriptreact][typescript][typescriptreact][json][html]",
"[javascript][javascriptreact][typescript][typescriptreact][json][jsonc][html]",
+ "rust-analyzer.server.extraEnv",
]
for entry in deprecated:
if entry in old_settings:
@@ -403,7 +404,7 @@ def setup_clangd_rust_in_vscode(command_context):
"--clang-tidy",
"--header-insertion=never",
],
- "rust-analyzer.server.extraEnv": {
+ "rust-analyzer.cargo.extraEnv": {
# Point rust-analyzer at the real target directory used by our
# build, so it can discover the files created when we run `./mach
# cargo check`.