Browse Source

Support Visual Studio Code

Carsten Sonne Larsen 9 months ago
parent
commit
b3d4d61e9d
4 changed files with 109 additions and 0 deletions
  1. 12
    0
      .vscode/keybindings.json
  2. 27
    0
      .vscode/launch.json
  3. 19
    0
      .vscode/settings.json
  4. 51
    0
      .vscode/tasks.json

+ 12
- 0
.vscode/keybindings.json View File

@@ -0,0 +1,12 @@
1
+[
2
+    {
3
+    "key": "ctrl+shift+c",
4
+    "command": "workbench.action.tasks.runTask",
5
+    "args": "Clean all"
6
+    },
7
+    {
8
+        "key": "ctrl+t",
9
+        "command": "workbench.action.tasks.runTask",
10
+        "args": "Run tests"
11
+    }
12
+]

+ 27
- 0
.vscode/launch.json View File

@@ -0,0 +1,27 @@
1
+{
2
+    // Use IntelliSense to learn about possible attributes.
3
+    // Hover to view descriptions of existing attributes.
4
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+    "version": "0.2.0",
6
+    "configurations": [
7
+        {
8
+            "name": "(gdb) Launch",
9
+            "type": "cppdbg",
10
+            "request": "launch",
11
+            "program": "${workspaceFolder}/amath",
12
+            "args": ["--shell"],
13
+            "stopAtEntry": false,
14
+            "cwd": "${workspaceFolder}",
15
+            "environment": [],
16
+            "externalConsole": true,
17
+            "MIMode": "gdb",
18
+            "setupCommands": [
19
+                {
20
+                    "description": "Enable pretty-printing for gdb",
21
+                    "text": "-enable-pretty-printing",
22
+                    "ignoreFailures": true
23
+                }
24
+            ]
25
+        }
26
+    ]
27
+}

+ 19
- 0
.vscode/settings.json View File

@@ -0,0 +1,19 @@
1
+{
2
+    "cSpell.words": [
3
+        "amath",
4
+        "carsten",
5
+        "innolan",
6
+        "sonne"
7
+    ],
8
+    "files.associations": {
9
+        "type_traits": "cpp",
10
+        "cctype": "cpp",
11
+        "cstdarg": "cpp",
12
+        "cstdio": "cpp",
13
+        "cstdlib": "cpp",
14
+        "cstdint": "cpp",
15
+        "exception": "cpp",
16
+        "new": "cpp",
17
+        "typeinfo": "cpp"
18
+    }
19
+}

+ 51
- 0
.vscode/tasks.json View File

@@ -0,0 +1,51 @@
1
+{
2
+    // See https://go.microsoft.com/fwlink/?LinkId=733558
3
+    // for the documentation about the tasks.json format
4
+    "version": "2.0.0",
5
+    "tasks": [
6
+        {
7
+            "label": "Open shell",
8
+            "type": "shell",
9
+            "command": "${workspaceFolder}/amath --shell",
10
+            "problemMatcher": []
11
+        },
12
+        {
13
+            "label": "Build all",
14
+            "command": "make",
15
+            "args": [
16
+                "all"
17
+            ],
18
+            "options": {
19
+                "cwd": "${workspaceRoot}"
20
+            },
21
+            "group": {
22
+                "kind": "build",
23
+                "isDefault": true
24
+            },
25
+            "problemMatcher": [
26
+                "$gcc"
27
+            ]
28
+        },
29
+        {
30
+            "label": "Clean all",
31
+            "command": "make",
32
+            "args": [
33
+                "clean"
34
+            ],
35
+            "options": {
36
+                "cwd": "${workspaceRoot}"
37
+            },
38
+            "problemMatcher": []
39
+        },
40
+        {
41
+            "label": "Run tests",
42
+            "type": "shell",
43
+            "command": "${workspaceFolder}/amath --test",
44
+            "group": "test",
45
+            "presentation": {
46
+                "reveal": "always",
47
+                "panel": "new"
48
+            }
49
+        }
50
+    ]
51
+}

Loading…
Cancel
Save