From c897d5caa3bd74e372f6d15bba106ceab8df6f8c Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Sat, 15 Aug 2020 17:26:48 +0100 Subject: [PATCH 1/2] add vscode editor settings and build tasks --- .gitignore | 1 - .vscode/c_cpp_properties.json | 18 ++++++++ .vscode/extensions.json | 6 +++ .vscode/settings.json | 6 +++ .vscode/tasks.json | 81 +++++++++++++++++++++++++++++++++++ 5 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index a7feb52cac..27adff8382 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ bin/ build/ yay0/ expected/ -.vscode/ .idea/ .DS_Store venv/ diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000000..7c226a0f4e --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,18 @@ +{ + "version": 4, + "configurations": [ + { + "name": "papermario", + "includePath": [ + "${workspaceFolder}/include" + ], + "defines": [ + "F3DEX_GBI_2", + "_LANGUAGE_C" + ], + "cStandard": "c89", + "cppStandard": "c++17", + "intelliSenseMode": "gcc-x86" + } + ] +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..0c8509af8c --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "ms-vscode.cpptools", + "nanaian.vscode-star-rod", + ], +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..c5dfc84c80 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "editor.detectIndentation": false, + "editor.insertSpaces": true, + "files.eol": "\n", + "files.insertFinalNewline": true, +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000000..7ea26fe0e7 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,81 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "make", + "type": "shell", + "command": "PM_HEADER_REBUILD=1 make all", + "problemMatcher": [ + { + "fileLocation": ["relative", "${workspaceFolder}"], + "pattern": { + "regexp": "^(src\\/.*):(\\d+):\\s+(warning|error):\\s+(.*)$", + "file": 1, + "line": 2, + "severity": 3, + "message": 4, + }, + }, + { + "fileLocation": ["relative", "${workspaceFolder}"], + "severity": "error", + "pattern": { + "regexp": "^(src\\/.*):(\\d+):\\s+(?!warning|\\()(.*)$", + "file": 1, + "line": 2, + "message": 3, + }, + }, + ], + "group": { + "kind": "build", + "isDefault": true, + }, + }, + { + "label": "diff", + "type": "shell", + "command": "PM_HEADER_REBUILD=1 ./diff.py -mwo ${input:funcName}", + "isBackground": true, + "problemMatcher": [ + { + "fileLocation": ["relative", "${workspaceFolder}"], + "background": { + "activeOnStart": true, + }, + "pattern": { + "regexp": "^(src\\/.*):(\\d+):\\s+(warning|error):\\s+(.*)$", + "file": 1, + "line": 2, + "severity": 3, + "message": 4, + }, + }, + { + "fileLocation": ["relative", "${workspaceFolder}"], + "background": { + "activeOnStart": true, + }, + "severity": "error", + "pattern": { + "regexp": "^(src\\/.*):(\\d+):\\s+(?!warning|\\()(.*)$", + "file": 1, + "line": 2, + "message": 3, + }, + }, + ], + "group": { + "kind": "test", + "isDefault": true, + }, + }, + ], + "inputs": [ + { + "id": "funcName", + "description": "Function name", + "type": "promptString", + } + ], +} From f64f74782b057c0b0f5e9d6b9ad672f50a42b840 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Sat, 15 Aug 2020 17:25:32 +0100 Subject: [PATCH 2/2] add editorconfig --- .editorconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..6e394e06ab --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.yaml] +indent_size = 2