From 6cab6f75a819340148aa554b9ea76149a119317d Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Wed, 8 Jun 2022 14:15:04 +0800 Subject: [PATCH] chore: add code runner config --- .vscode/settings.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 5d216026..4e20d03d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -84,5 +84,16 @@ "stop_token": "cpp" }, "go.formatTool": "goformat", - "go.formatFlags": ["-style", "indent=4"] + "go.formatFlags": ["-style", "indent=4"], + "code-runner.fileDirectoryAsCwd": true, + "code-runner.runInTerminal": true, + "code-runner.executorMap": { + "c": "gcc $fileName -o $fileNameWithoutExt.exe -O2 -lm && ./$fileNameWithoutExt.exe", + "cpp": "g++ --std=c++14 $fileName -o $fileNameWithoutExt.exe -O2 -lm -fsanitize=address,undefined -fno-ms-extensions -Wall && ./$fileNameWithoutExt.exe", + "python": "python -u $fileName", + "go": "go run $fileName", + "javascript": "node $fileName", + "typescript": "ts-node $fileName", + "rust": "rustc $fileName -o $fileNameWithoutExt.exe && ./$fileNameWithoutExt.exe" + }, }