Skip to content

Commit

Permalink
chore: enable vscode solidity monorepo support (#638)
Browse files Browse the repository at this point in the history
* chore: enable solidity monorepo

* chore: suggest vscode solidity extension
  • Loading branch information
holic authored Apr 18, 2023
1 parent 30ac884 commit 64776b8
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["JuanBlanco.solidity"]
}
15 changes: 1 addition & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
{
// Workaround for https://github.com/juanfranblanco/vscode-solidity/issues/335#issuecomment-1505564408
// This only works because we:
// - use pnpm for dependencies rather than forge lib (submodules)
// - have aligned all dependency versions across all packages
"solidity.remappings": [
"memmove/=node_modules/.pnpm/github.com+dk1a+memmove@ffd71cd77b1708574ef46a667b23ca3a5cc9fa27/node_modules/memmove/src/",
"ds-test/=node_modules/.pnpm/github.com+dapphub+ds-test@c9ce3f25bde29fc5eb9901842bf02850dfd2d084/node_modules/ds-test/src/",
"forge-std/=node_modules/.pnpm/github.com+foundry-rs+forge-std@b4f121555729b3afb3c5ffccb62ff4b6e2818fd3/node_modules/forge-std/src/",
"solmate/=node_modules/.pnpm/github.com+transmissions11+solmate@9cf1428245074e39090dceacb0c28b1f684f584c/node_modules/solmate/src",
"ds-test/=node_modules/.pnpm/github.com+dapphub+ds-test@c9ce3f25bde29fc5eb9901842bf02850dfd2d084/node_modules/ds-test/src/",
"@latticexyz/=packages/",
"std-contracts/=packages/std-contracts/src/",
"solecs/=packages/solecs/src/"
]
"solidity.monoRepoSupport": true
}
3 changes: 3 additions & 0 deletions templates/minimal/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["JuanBlanco.solidity"]
}
11 changes: 1 addition & 10 deletions templates/minimal/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
{
"solidity.remappings": [
"components/=./packages/contracts/src/components",
"systems/=./packages/contracts/src/systems",
"libraries/=./packages/contracts/src/libraries",
"std-contracts/=./node_modules/@latticexyz/std-contracts/src/",
"solecs/=./node_modules/@latticexyz/solecs/src/",
"memmove/=./node_modules/memmove/src/",
"ds-test/=./node_modules/ds-test/src/",
"forge-std/=./node_modules/forge-std/src/"
]
"solidity.monoRepoSupport": true
}
3 changes: 3 additions & 0 deletions templates/react/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["JuanBlanco.solidity"]
}
11 changes: 1 addition & 10 deletions templates/react/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
{
"solidity.remappings": [
"components/=./packages/contracts/src/components",
"systems/=./packages/contracts/src/systems",
"libraries/=./packages/contracts/src/libraries",
"std-contracts/=./node_modules/@latticexyz/std-contracts/src/",
"solecs/=./node_modules/@latticexyz/solecs/src/",
"memmove/=./node_modules/memmove/src/",
"ds-test/=./node_modules/ds-test/src/",
"forge-std/=./node_modules/forge-std/src/"
]
"solidity.monoRepoSupport": true
}

0 comments on commit 64776b8

Please sign in to comment.