mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
add cargo watch tasks
use extension problemMatcher
This commit is contained in:
parent
536a579f2e
commit
fe1df18a6e
1 changed files with 35 additions and 22 deletions
55
.vscode/tasks.json
vendored
55
.vscode/tasks.json
vendored
|
@ -10,38 +10,51 @@
|
||||||
"problemMatcher": {
|
"problemMatcher": {
|
||||||
"owner": "typescript",
|
"owner": "typescript",
|
||||||
"pattern": "$tsc",
|
"pattern": "$tsc",
|
||||||
"fileLocation": ["relative", "${workspaceRoot}/editors/code"]
|
"fileLocation": [
|
||||||
|
"relative",
|
||||||
|
"${workspaceRoot}/editors/code"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"path": "editors/code/"
|
"path": "editors/code/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Build Lsp",
|
"label": "Build Lsp",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "cargo build",
|
"command": "cargo check",
|
||||||
"problemMatcher": {
|
"problemMatcher": "$rustc"
|
||||||
"owner": "rust",
|
|
||||||
"fileLocation": ["relative", "${workspaceRoot}"],
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^(warning|warn|error)(?:\\[(.*?)\\])?: (.*)$",
|
|
||||||
"severity": 1,
|
|
||||||
"code": 2,
|
|
||||||
"message": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"column": 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Build All",
|
"label": "Build All",
|
||||||
"group": "build",
|
"group": "build",
|
||||||
"dependsOn": ["Build Extension", "Build Lsp"],
|
"dependsOn": [
|
||||||
|
"Build Extension",
|
||||||
|
"Build Lsp"
|
||||||
|
],
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "cargo watch",
|
||||||
|
"group": "build",
|
||||||
|
"isBackground": true,
|
||||||
|
"type": "shell",
|
||||||
|
"command": "cargo",
|
||||||
|
"args": [
|
||||||
|
"watch"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$rustc-watch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "cargo watch tests",
|
||||||
|
"group": "build",
|
||||||
|
"isBackground": true,
|
||||||
|
"type": "shell",
|
||||||
|
"command": "cargo",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"-x",
|
||||||
|
"check --tests"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$rustc-watch"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in a new issue