From b3d4d61e9d9310776cfb3e3931954ab841685ece Mon Sep 17 00:00:00 2001 From: Carsten Larsen Date: Sun, 5 Aug 2018 21:45:38 +0200 Subject: [PATCH] Support Visual Studio Code --- .vscode/keybindings.json | 12 ++++++++++ .vscode/launch.json | 27 +++++++++++++++++++++ .vscode/settings.json | 19 +++++++++++++++ .vscode/tasks.json | 51 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+) create mode 100644 .vscode/keybindings.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/keybindings.json b/.vscode/keybindings.json new file mode 100644 index 00000000..a8505168 --- /dev/null +++ b/.vscode/keybindings.json @@ -0,0 +1,12 @@ +[ + { + "key": "ctrl+shift+c", + "command": "workbench.action.tasks.runTask", + "args": "Clean all" + }, + { + "key": "ctrl+t", + "command": "workbench.action.tasks.runTask", + "args": "Run tests" + } +] \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..a885b640 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/amath", + "args": ["--shell"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..91b0dacb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,19 @@ +{ + "cSpell.words": [ + "amath", + "carsten", + "innolan", + "sonne" + ], + "files.associations": { + "type_traits": "cpp", + "cctype": "cpp", + "cstdarg": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstdint": "cpp", + "exception": "cpp", + "new": "cpp", + "typeinfo": "cpp" + } +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..8692c004 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,51 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Open shell", + "type": "shell", + "command": "${workspaceFolder}/amath --shell", + "problemMatcher": [] + }, + { + "label": "Build all", + "command": "make", + "args": [ + "all" + ], + "options": { + "cwd": "${workspaceRoot}" + }, + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [ + "$gcc" + ] + }, + { + "label": "Clean all", + "command": "make", + "args": [ + "clean" + ], + "options": { + "cwd": "${workspaceRoot}" + }, + "problemMatcher": [] + }, + { + "label": "Run tests", + "type": "shell", + "command": "${workspaceFolder}/amath --test", + "group": "test", + "presentation": { + "reveal": "always", + "panel": "new" + } + } + ] +} \ No newline at end of file