build: add VSCode extension recommendations (#28784)

Previously, the VSCode settings for the workspace specified the
`clang-format.executable` setting to configure auto-formatting to use
`clang-format`. Yet, this setting has no effect without the extension
that provides that configuration option namely [xaver.clang-format][1]).
For people that didn't have the extension installed, VSCode would use
the default formatters, resulting in vastly different file fomatting.

This commit adds a set of [rcommended workspace extensions][2], to help
people get the right extensions when checking out the repository.

The recommended extensions are:
- [gkalpak.aio-docs-utils][3]:
  Utilities to aid in authoring/viewing Angular documentation source
  code. Currently, mainly aid in working with
  `{@example}`/`<code-example>` tags.
- [ms-vscode.vscode-typescript-tslint-plugin][4]:
  Add auto-linting for TS files using `tslint` while editing.
- [xaver.clang-format][1]:
  Add auto-formatting for JS/TS files using `clang-format`.

[1]: https://marketplace.visualstudio.com/items?itemName=xaver.clang-format
[2]: http://go.microsoft.com/fwlink/?LinkId=827846
[3]: https://marketplace.visualstudio.com/items?itemName=gkalpak.aio-docs-utils
[4]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin

PR Close #28784
This commit is contained in:
George Kalpakas 2019-02-17 15:23:53 +02:00 committed by Igor Minar
parent 3a6e443e19
commit 2b974d4012
2 changed files with 13 additions and 1 deletions

11
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"gkalpak.aio-docs-utils",
"ms-vscode.vscode-typescript-tslint-plugin",
"xaver.clang-format",
],
}

View File

@ -5,7 +5,8 @@
"[typescript]": {
"editor.formatOnSave": true,
},
// Please install http://clang.llvm.org/docs/ClangFormat.html in VSCode to take advantage of clang-format
// Please install https://marketplace.visualstudio.com/items?itemName=xaver.clang-format to take advantage of `clang-format` in VSCode.
// (See https://clang.llvm.org/docs/ClangFormat.html for more info `clang-format`.)
"clang-format.executable": "${workspaceRoot}/node_modules/.bin/clang-format",
"files.watcherExclude": {
"**/.git/objects/**": true,