From 7835c2abaf00f0a40c247b59021b1b5b6c0ae28a Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Mon, 23 Sep 2024 18:52:59 +0100 Subject: [PATCH] chore: root repo vscode settings for `rust-analyzer` (#4556) ### Description `rust-analyzer` only detects workspaces that are 1 directory deep in the source tree, otherwise it has to be configured with the path to workspaces. This PR checks in `.vscode` settings with paths to the rust workspaces. This also fixes the issue where someone checks out the monorepo to make TS changes but can't commit because our husky precommit setups assumes that rust workspaces have already been built (which `rust-analyzer` does implicitly). Noting that the problem is only there if the repo isn't opened using the `mono.code-workspace` setting, which people I talked to don't use (other than @paulbalaji) --- .vscode/settings.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..6cb83cc9f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "rust-analyzer.linkedProjects": [ + "./rust/main/Cargo.toml", + "./rust/sealevel/Cargo.toml", + ], +} \ No newline at end of file