Skip to content

Commit eb0e29b

Browse files
filipesilvajasonaden
authored andcommitted
build: make VSCode settings opt-in (#29504)
PR Close #29504
1 parent 71daa11 commit eb0e29b

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pubspec.lock
1313
.idea/
1414
.settings/
1515
.vscode/launch.json
16+
.vscode/settings.json
1617
*.swo
1718
modules/.settings
1819
modules/.vscode

.vscode/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# VSCode Configuration
2+
3+
This folder contains opt-in [Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings) and [Extension Recommendations](https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions) that the Angular team recommends using when working on this repository.
4+
5+
## Usage
6+
7+
To use the recommended settings follow the steps below:
8+
9+
- install <https://marketplace.visualstudio.com/items?itemName=xaver.clang-format>
10+
- copy `.vscode/recommended-settings.json` to `.vscode/settings.json`
11+
- restart the editor
12+
13+
If you already have your custom workspace settings you should instead manually merge the file content.
14+
15+
This isn't an automatic process so you will need to repeat it when settings are updated.
16+
17+
To see the recommended extensions select "Extensions: Show Recommended Extensions" in the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette).
18+
19+
## Editing `.vscode/recommended-settings.json`
20+
21+
If you wish to add extra configuration items please keep in mind any settings you add here will be used by many users.
22+
23+
Try to keep these settings to things that help facilitate the development process and avoid altering the user workflow whenever possible.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
// Format js and ts files on save with `clang-format.executable`
3+
// If `clang-format.executable` is not being used, these two settings should be removed otherwise it will break existing formatting.
4+
// You can instead run `yarn gulp format` to manually format your code.
25
"[javascript]": {
36
"editor.formatOnSave": true,
47
},
@@ -8,6 +11,7 @@
811
// Please install https://marketplace.visualstudio.com/items?itemName=xaver.clang-format to take advantage of `clang-format` in VSCode.
912
// (See https://clang.llvm.org/docs/ClangFormat.html for more info `clang-format`.)
1013
"clang-format.executable": "${workspaceRoot}/node_modules/.bin/clang-format",
14+
// Exclude third party modules and build artifacts from the editor watchers/searches.
1115
"files.watcherExclude": {
1216
"**/.git/objects/**": true,
1317
"**/.git/subtree-cache/**": true,

0 commit comments

Comments
 (0)