Skip to content

Commit

Permalink
chore: Move VSCode settings to settings.json file but keep `.code-w…
Browse files Browse the repository at this point in the history
…orkspace`
  • Loading branch information
wottpal committed Dec 12, 2023
1 parent f9338a7 commit bc7d7ed
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 50 deletions.
6 changes: 6 additions & 0 deletions .changeset/silver-mangos-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@inkathon/contracts": patch
"@inkathon/frontend": patch
---

Move VSCode settings to `settings.json` file but keep `inkathon.code-workspace`. It's now also supported by default to develop with ink!athon without opening the code-workspace file.
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"ink-analyzer.ink-analyzer",
"gruntfuggly.todo-tree",
"mikestead.dotenv",
"bradlc.vscode-tailwindcss",
"zoma.vscode-auto-open-workspace"
"bradlc.vscode-tailwindcss"
]
}
47 changes: 47 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"search.exclude": {
"**/*.{jpg,jpeg,png,svg,webm,mp4,ttf,woff,woff2}": true
},
"search.useIgnoreFiles": true,
"search.useGlobalIgnoreFiles": true,
"search.useParentIgnoreFiles": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "always",
"source.fixAll.eslint": "always"
},
"files.associations": {
".env.*": "dotenv",
"*.css": "tailwindcss"
},
"[javascriptreact][typescriptreact][javascript][typescript][markdown][html][css][scss][sass][json][jsonc][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact][typescriptreact][javascript][typescript]": {
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
},
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
"javascript.preferences.importModuleSpecifier": "shortest",
"typescript.preferences.importModuleSpecifier": "shortest",
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"evenBetterToml.formatter.indentString": " ",
"evenBetterToml.formatter.columnWidth": 120,
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"peacock.color": "#8758FF",
"workbench.colorCustomizations": {
"sash.hoverBorder": "#ac8bff",
"statusBar.background": "#8758ff",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#ac8bff",
"statusBarItem.remoteBackground": "#8758ff",
"statusBarItem.remoteForeground": "#e7e7e7"
}
}
30 changes: 13 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ For general scripts, the same environment variable initialization & configuratio

![inkathon Stack Diagram](inkathon-stack-diagram.png)

> [!NOTE]
> When opening the project directory in VSCode, it automatically suggests opening the `inkathon.code-workspace` file instead. This is recommended as it offers a more predictable monorepo configuration.
## Live Examples 🌐

Below you find live examples that use this boilerplate or have a similar setup inspired by it:
Expand Down Expand Up @@ -248,9 +245,9 @@ When running the same script again, this deployer account defined there will be

### Workspace

It's recommended to develop in VSCode by opening the workspace file `inkathon.code-workspace` instead of just the plain directory. This approach offers multiple advantages, including a more predictable monorepo configuration. VSCode will also automatically suggest switching to the workspace when opening the project's root directory in the bottom right corner.
It can be helpful to develop in VSCode by opening the workspace file `inkathon.code-workspace` instead of just the plain directory. This approach offers multiple advantages, like sections in the file explorer, or shortcut actions to open the terminal in the correct directory.

<img src="inkathon-vscode-workspace.png" width="400" alt="VSCode Workspace Notification">
Consider installin the [`zoma.vscode-auto-open-workspace`](https://marketplace.visualstudio.com/items?itemName=zoma.vscode-auto-open-workspace) extension to automatically open the workspace file when opening the directory.

### Plugins

Expand All @@ -259,18 +256,17 @@ Additionally, the VSCode plugins listed below are recommended as they can be ver
<details>
<summary><strong>All Recommended Plugins</strong></summary>

| Plugin Name | Description |
| ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------- |
| [`dbaeumer.vscode-eslint`](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) | Adds ESLint editor support. |
| [`esbenp.prettier-vscode`](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) | Adds Prettier editor support. |
| [`bradlc.vscode-tailwindcss`](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) | Adds tailwindcss editor support. |
| [`rust-lang.rust-analyzer`](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) | Adds Rust language support. |
| [`ink-analyzer.ink-analyzer`](https://marketplace.visualstudio.com/items?itemName=ink-analyzer.ink-analyzer) | Adds ink! language support. |
| [`tamasfe.even-better-toml`](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml) | Adds `.toml` file support. |
| [`gruntfuggly.todo-tree`](https://marketplace.visualstudio.com/items?itemName=gruntfuggly.todo-tree) | Lists all `TODO` comments in your workspace. |
| [`wayou.vscode-todo-highlight`](https://marketplace.visualstudio.com/items?itemName=wayou.vscode-todo-highlight) | Highlights `TODO` comments in your workspace. |
| [`mikestead.dotenv`](https://marketplace.visualstudio.com/items?itemName=mikestead.dotenv) | Adds syntax highlighting for `.env` files. |
| [`zoma.vscode-auto-open-workspace`](https://marketplace.visualstudio.com/items?itemName=zoma.vscode-auto-open-workspace) | Auto-opens `*.code-workspace` files. |
| Plugin Name | Description |
| ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| [`dbaeumer.vscode-eslint`](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) | Adds ESLint editor support. |
| [`esbenp.prettier-vscode`](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) | Adds Prettier editor support. |
| [`bradlc.vscode-tailwindcss`](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) | Adds tailwindcss editor support. |
| [`rust-lang.rust-analyzer`](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) | Adds Rust language support. |
| [`ink-analyzer.ink-analyzer`](https://marketplace.visualstudio.com/items?itemName=ink-analyzer.ink-analyzer) | Adds ink! language support. |
| [`tamasfe.even-better-toml`](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml) | Adds `.toml` file support. |
| [`gruntfuggly.todo-tree`](https://marketplace.visualstudio.com/items?itemName=gruntfuggly.todo-tree) | Lists all `TODO` comments in your workspace. |
| [`wayou.vscode-todo-highlight`](https://marketplace.visualstudio.com/items?itemName=wayou.vscode-todo-highlight) | Highlights `TODO` comments in your workspace. |
| [`mikestead.dotenv`](https://marketplace.visualstudio.com/items?itemName=mikestead.dotenv) | Adds syntax highlighting for `.env` files. |

</details>

Expand Down
Binary file removed inkathon-vscode-workspace.png
Binary file not shown.
32 changes: 1 addition & 31 deletions inkathon.code-workspace
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"folders": [
{
"name": "ROOT",
"name": "Project Root",
"path": "./"
},
{
Expand All @@ -14,40 +14,10 @@
}
],
"settings": {
"search.exclude": {
"**/*.{jpg,jpeg,png,svg,webm,mp4,ttf,woff,woff2}": true
},
"search.useIgnoreFiles": true,
"search.useGlobalIgnoreFiles": true,
"search.useParentIgnoreFiles": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "always",
"source.fixAll.eslint": "always"
},
"files.associations": {
".env.*": "dotenv",
"*.css": "tailwindcss"
},
"[javascriptreact][typescriptreact][javascript][typescript][markdown][html][css][scss][sass][json][jsonc][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact][typescriptreact][javascript][typescript]": {
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
},
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"evenBetterToml.formatter.indentString": " ",
"evenBetterToml.formatter.columnWidth": 120,
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"peacock.color": "#8758FF",
"workbench.colorCustomizations": {
"sash.hoverBorder": "#ac8bff",
Expand Down

0 comments on commit bc7d7ed

Please sign in to comment.