Skip to content

Commit

Permalink
chore: root repo vscode settings for rust-analyzer (#4556)
Browse files Browse the repository at this point in the history
### 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)
  • Loading branch information
daniel-savu authored Sep 23, 2024
1 parent 82a90c1 commit 7835c2a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"rust-analyzer.linkedProjects": [
"./rust/main/Cargo.toml",
"./rust/sealevel/Cargo.toml",
],
}

0 comments on commit 7835c2a

Please sign in to comment.