Skip to content

Commit

Permalink
chore: ignore VS Code's .code-workspace so that personal settings u…
Browse files Browse the repository at this point in the history
…sed by devs are not committed to the codebase (redwoodjs#3526)

* chore: update workbench.colorCustomizations

for those that leverage `johnpapa.vscode-peacock`
https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock

* chore: ignore local .code-workspace file

see:
* redwoodjs#3526 (comment)
* https://code.visualstudio.com/docs/getstarted/settings
* https://stackoverflow.com/questions/44629890/what-is-a-workspace-in-visual-studio-code
* microsoft/vscode#37519

* Revert "chore: update workbench.colorCustomizations"

This reverts commit d0196c4.

* add .vscode README

Co-authored-by: David Price <thedavid@thedavidprice.com>
  • Loading branch information
virtuoushub and thedavidprice authored Oct 16, 2021
1 parent d788d79 commit 59bc2a1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ yarn-error.log
tasks/.verdaccio
tasks/e2e/cypress/fixtures/example.json
tmp/
.vscode/*
blog-test-project/*
.yarn/*
**/.yarn/install-state.gz
Expand All @@ -19,3 +18,4 @@ blog-test-project/*
!.yarn/sdks
!.yarn/versions
.pnp.*
*.code-workspace
27 changes: 27 additions & 0 deletions .vscode/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## VS Code Settings
This directory includes global workspace settings for local development of the RedwoodJS Framework.

See:
- [VS Code Doc: User and Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings)
- [What is a VS Code Workspace?](https://stackoverflow.com/questions/44629890/what-is-a-workspace-in-visual-studio-code)

### Overriding Global Settings
It is possible to create your own "local" settings, overriding the global, via a `.code-workspace` file. See:
- [Workspace Settings](https://code.visualstudio.com/docs/editor/multi-root-workspaces#_settings)
- [Local settings overrides](https://github.com/microsoft/vscode/issues/37519)

> `*.code-workspace` files are included in `.gitignore`
For example, if you want a bright pink status background (and who doesn't?), create this file in the root of your project `mySettings.code-workspace`:
```
// mySettings.code-workspace
"workbench.colorCustomizations": {
"statusBar.background": "#ff007f",
},
```

> **WARNING:** If you create a custom file that is ignored by git, then _anytime_ you run `git clean -fxd` the file will be permanently deleted.
>
> You can avoid this by using the option `-e`, e.g. `git clean -fxd -e mySettings.code-workspace`.

0 comments on commit 59bc2a1

Please sign in to comment.