Skip to content

Instantly share code, notes, and snippets.

@jhasse
Created September 12, 2017 08:13
Show Gist options
  • Save jhasse/41cc03e2c09cbb19fdc9a941ee0b1ae0 to your computer and use it in GitHub Desktop.
Save jhasse/41cc03e2c09cbb19fdc9a941ee0b1ae0 to your computer and use it in GitHub Desktop.
Visual Studio Code task for cargo
{
"version": "2.0.0",
"windows": {
"command": "C:\\msys64\\usr\\bin\\bash"
},
"linux": {
"command": "/bin/bash"
},
"args": ["-lc", "cd \"\"${workspaceRoot}\"\" && cargo $0 && $@"],
"options": {
"env": {
"LANG": "C.UTF-8",
"PYTHONUNBUFFERD": "1",
"MSYSTEM": "MINGW64"
}
},
"tasks": [
{
"taskName": "build",
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceRoot}/"
],
"pattern": [
{
"regexp": "^(warning|error|fatal error)\\[.\\d+\\]: (.*)$",
"severity": 1,
"message": 2
},
{
"regexp": "^ --> (.*):(\\d+):(\\d+)$",
"file": 1,
"line": 2,
"column": 3
}
]
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment