From fe1df18a6e1ee61d18a2b78bfd084ef382814f6a Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 10 Mar 2019 13:54:18 +0100 Subject: add cargo watch tasks use extension problemMatcher --- .vscode/tasks.json | 57 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 22 deletions(-) (limited to '.vscode') diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 045cee326..d64e28717 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -10,38 +10,51 @@ "problemMatcher": { "owner": "typescript", "pattern": "$tsc", - "fileLocation": ["relative", "${workspaceRoot}/editors/code"] + "fileLocation": [ + "relative", + "${workspaceRoot}/editors/code" + ] }, "path": "editors/code/" }, { "label": "Build Lsp", "type": "shell", - "command": "cargo build", - "problemMatcher": { - "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 - } - ] - } + "command": "cargo check", + "problemMatcher": "$rustc" }, { "label": "Build All", "group": "build", - "dependsOn": ["Build Extension", "Build Lsp"], + "dependsOn": [ + "Build Extension", + "Build Lsp" + ], "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" } ] -} +} \ No newline at end of file -- cgit v1.2.3