ide-support: Add vscode default settings.json and gitignores
This adds a .default settings.json file for vscode, so that you do not need to copy/paste form the ide-support.md doc. This also makes it easier for people that don't known that the ide-support.md doc exists. This also adds the .vscode directory to the gitignores, so that local customization/settings are not always in the git status. BRANCH=none BUG=none TEST=Checked in Gitiles TEST=Check that my settings.json is not in "git status". TEST=Check that ec.code-workspace is not in "git status". Change-Id: I4dd8cfcd79c291a6f4fb0d573df131f0cb0d9844 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2586041 Commit-Queue: Jett Rink <jettrink@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
This commit is contained in:
parent
d76cd68529
commit
bce4e485bb
|
@ -11,3 +11,9 @@ cscope.*
|
||||||
.tests-passed
|
.tests-passed
|
||||||
.failedboards/
|
.failedboards/
|
||||||
.sizes.txt
|
.sizes.txt
|
||||||
|
|
||||||
|
# VSCode IDE
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/README.md
|
||||||
|
!.vscode/settings.json.default
|
||||||
|
*.code-workspace
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# VSCode Setting
|
||||||
|
|
||||||
|
See [docs/ide-support.md](/docs/ide-support.md).
|
|
@ -0,0 +1,35 @@
|
||||||
|
/* Copy this file to settings.json to active these defaults. */
|
||||||
|
{
|
||||||
|
"editor.rulers": [
|
||||||
|
80
|
||||||
|
],
|
||||||
|
/* C, Makefiles, ASM, Linkerfiles, Properties */
|
||||||
|
"editor.insertSpaces": false,
|
||||||
|
"editor.tabSize": 8,
|
||||||
|
/* Some exceptions based on current trends */
|
||||||
|
"[markdown]": {
|
||||||
|
"editor.insertSpaces": true,
|
||||||
|
"editor.tabSize": 2
|
||||||
|
},
|
||||||
|
"[python]": {
|
||||||
|
"editor.insertSpaces": true,
|
||||||
|
"editor.tabSize": 2
|
||||||
|
},
|
||||||
|
"[shellscript]": {
|
||||||
|
"editor.insertSpaces": true,
|
||||||
|
"editor.tabSize": 2
|
||||||
|
},
|
||||||
|
"[yaml]": {
|
||||||
|
"editor.insertSpaces": true,
|
||||||
|
"editor.tabSize": 2
|
||||||
|
},
|
||||||
|
"files.associations": {
|
||||||
|
"Makefile.*": "makefile",
|
||||||
|
"*.inc": "c",
|
||||||
|
"*.wrap": "c",
|
||||||
|
"*.tasklist": "c",
|
||||||
|
"*.irqlist": "c",
|
||||||
|
"*.mocklist": "c",
|
||||||
|
"*.testlist": "c"
|
||||||
|
}
|
||||||
|
}
|
|
@ -49,40 +49,9 @@ includes selectable sub-configurations for every board/image pair.
|
||||||
can select a configuration by pressing `Ctrl-Shift-P` and selecting the
|
can select a configuration by pressing `Ctrl-Shift-P` and selecting the
|
||||||
`C/C++ Select a Configuration...` option.
|
`C/C++ Select a Configuration...` option.
|
||||||
|
|
||||||
5. Add the EC specific file associations and style settings. Modify
|
5. Add the EC specific file associations and style settings. Do the following
|
||||||
`.vscode/settings.json` to have the following elements:
|
to copy the default settings to `.vscode/settings.json`:
|
||||||
|
|
||||||
```json
|
```bash
|
||||||
{
|
cp .vscode/settings.json.default .vscode/settings.json
|
||||||
"editor.rulers": [80],
|
|
||||||
/* C, Makefiles, ASM, Linkerfiles, Properties */
|
|
||||||
"editor.insertSpaces": false,
|
|
||||||
"editor.tabSize": 8,
|
|
||||||
/* Some exceptions based on current trends */
|
|
||||||
"[markdown]": {
|
|
||||||
"editor.insertSpaces": true,
|
|
||||||
"editor.tabSize": 2
|
|
||||||
},
|
|
||||||
"[python]": {
|
|
||||||
"editor.insertSpaces": true,
|
|
||||||
"editor.tabSize": 2
|
|
||||||
},
|
|
||||||
"[shellscript]": {
|
|
||||||
"editor.insertSpaces": true,
|
|
||||||
"editor.tabSize": 2
|
|
||||||
},
|
|
||||||
"[yaml]": {
|
|
||||||
"editor.insertSpaces": true,
|
|
||||||
"editor.tabSize": 2
|
|
||||||
},
|
|
||||||
"files.associations": {
|
|
||||||
"Makefile.*": "makefile",
|
|
||||||
"*.inc": "c",
|
|
||||||
"*.wrap": "c",
|
|
||||||
"*.tasklist": "c",
|
|
||||||
"*.irqlist": "c",
|
|
||||||
"*.mocklist": "c",
|
|
||||||
"*.testlist": "c"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue