From 2b974d401262faec617de81bfdfbd47614b19004 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Sun, 17 Feb 2019 15:23:53 +0200 Subject: [PATCH] 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}`/`` 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 --- .vscode/extensions.json | 11 +++++++++++ .vscode/settings.json | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..eba8ef7fde --- /dev/null +++ b/.vscode/extensions.json @@ -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", + ], +} diff --git a/.vscode/settings.json b/.vscode/settings.json index b51f0348c6..aa218980f7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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,