0
Files
src/tools/vscode/cpp.code-snippets
Ming-Ying Chung 8dadf3f3e6 [docs] Update extension-related instructions for VS Code editor.
This CL mainly includes the following changes:

1. Update the "Useful Extensions" for VS Code. ChromiumIDE-specific ones
   are added, and outdated extensions are removed.
2. Polish the "Setup for Chromium" section. Now it suggests copying all
   VS Code configurations from the Chromium checkout.
3. Add a list of recommended VS Code extensions into
   `tools/vscode/extensions.json`, such that users can just install them
   all from the VS Code UI.
4. Update `tools/vscode/settings.json` to include a recommended C/C++
   configuration from the doc.

Change-Id: Iea24a9203989ecab5248836f72e0cc369fa46c9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5364766
Reviewed-by: Chase Phillips <cmp@chromium.org>
Commit-Queue: Chase Phillips <cmp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1271713}
2024-03-12 18:47:27 +00:00

39 lines
1.2 KiB
Plaintext

{
// This file contains snippets that might be useful to you for Chrome
// development.
"Chrome Header": {
"prefix": "hdr",
"body": [
"// Copyright ${CURRENT_YEAR} The Chromium Authors",
"// Use of this source code is governed by a BSD-style license that can be",
"// found in the LICENSE file.",
"${0:",
"#ifndef ${TM_FILEPATH/(^\\/.*\\/src\\/)|([^a-zA-Z0-9])|([a-zA-Z0-9])/${2:+_}${3:/upcase}/g}_",
"#define ${TM_FILEPATH/(^\\/.*\\/src\\/)|([^a-zA-Z0-9])|([a-zA-Z0-9])/${2:+_}${3:/upcase}/g}_",
"",
"#endif // ${TM_FILEPATH/(^\\/.*\\/src\\/)|([^a-zA-Z0-9])|([a-zA-Z0-9])/${2:+_}${3:/upcase}/g}_}",
]
},
"Chrome Copyright": {
"prefix": "copyright",
"body": [
"// Copyright ${CURRENT_YEAR} The Chromium Authors",
"// Use of this source code is governed by a BSD-style license that can be",
"// found in the LICENSE file.",
]
},
"Chrome Log": {
"prefix": "log",
"body": "LOG(ERROR) << \"${1:message}\";",
"description": "Chrome Log output to console"
},
"Stack trace": {
"prefix": "st",
"body": "base::debug::StackTrace().Print();"
},
"Stack trace header": {
"prefix": "sth",
"body": "#include \"base/debug/stack_trace.h\""
}
}