5500: ProblemMatcher fixes/improvements. r=matklad a=rickvanprim

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5482.

ProblemMatcher auto detects relative/absolute paths and matches VSCode LSP's owner and source.  VSCode LSP updated to specify owner.

Co-authored-by: James Leitch <rickvanprim@gmail.com>
This commit is contained in:
bors[bot] 2020-07-23 12:02:42 +00:00 committed by GitHub
commit 803f3613ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -655,24 +655,30 @@
"problemMatchers": [
{
"name": "rustc",
"owner": "rustc",
"source": "rustc",
"fileLocation": [
"relative",
"autoDetect",
"${workspaceRoot}"
],
"pattern": "$rustc"
},
{
"name": "rustc-json",
"owner": "rustc",
"source": "rustc",
"fileLocation": [
"relative",
"autoDetect",
"${workspaceRoot}"
],
"pattern": "$rustc-json"
},
{
"name": "rustc-watch",
"owner": "rustc",
"source": "rustc",
"fileLocation": [
"relative",
"autoDetect",
"${workspaceRoot}"
],
"background": {

View File

@ -41,6 +41,7 @@ export function createClient(serverPath: string, cwd: string): lc.LanguageClient
const clientOptions: lc.LanguageClientOptions = {
documentSelector: [{ scheme: 'file', language: 'rust' }],
initializationOptions: vscode.workspace.getConfiguration("rust-analyzer"),
diagnosticCollectionName: "rustc",
traceOutputChannel,
middleware: {
// Workaround for https://github.com/microsoft/vscode-languageserver-node/issues/576