diff --git a/.gitignore b/.gitignore index 6532cf43ee..bb266eff45 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,9 @@ cscope.* .tests-passed .failedboards/ .sizes.txt + +# VSCode IDE +.vscode/* +!.vscode/README.md +!.vscode/settings.json.default +*.code-workspace diff --git a/.vscode/README.md b/.vscode/README.md new file mode 100644 index 0000000000..1e83806519 --- /dev/null +++ b/.vscode/README.md @@ -0,0 +1,3 @@ +# VSCode Setting + +See [docs/ide-support.md](/docs/ide-support.md). diff --git a/.vscode/settings.json.default b/.vscode/settings.json.default new file mode 100644 index 0000000000..1868e4f3af --- /dev/null +++ b/.vscode/settings.json.default @@ -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" + } +} \ No newline at end of file diff --git a/docs/ide-support.md b/docs/ide-support.md index 022373042f..cec196be58 100644 --- a/docs/ide-support.md +++ b/docs/ide-support.md @@ -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 `C/C++ Select a Configuration...` option. -5. Add the EC specific file associations and style settings. Modify - `.vscode/settings.json` to have the following elements: +5. Add the EC specific file associations and style settings. Do the following + to copy the default settings to `.vscode/settings.json`: - ```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" - } - } + ```bash + cp .vscode/settings.json.default .vscode/settings.json ```