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

This commit is contained in:
James Leitch 2020-07-22 22:32:54 -07:00
parent 56ff9ef026
commit 995c624f57
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