From c2c8b8d60492166b57e7440eb6bea46f1cfe308b Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Fri, 28 Jun 2024 17:57:10 -0500 Subject: [PATCH] vscode: use buck for `rust-analyzer` settings --- .vscode/settings.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 9d61605e83..6998959391 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,4 +10,21 @@ "BUILD": "starlark", "PACKAGE": "starlark", }, + + "rust-analyzer.workspace.discoverConfig": { + "command": [ + "rust-project", + "develop-json", + "--sysroot-mode=rustc", + "{arg}" + ], + "progressLabel": "rust-analyzer[buck2]", + "filesToWatch": ["BUILD", "PACKAGE"] + }, + + "rust-analyzer.check.overrideCommand": [ + "rust-project", + "check", + "$saved_file", + ] }