Add support for a seperate output channel for trace messages

This commit is contained in:
DJMcNab 2019-02-10 10:06:33 +00:00
parent 166c720425
commit 9138317021
3 changed files with 13 additions and 10 deletions

View file

@ -2507,18 +2507,18 @@
"integrity": "sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg=="
},
"vscode-languageclient": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-5.2.1.tgz",
"integrity": "sha512-7jrS/9WnV0ruqPamN1nE7qCxn0phkH5LjSgSp9h6qoJGoeAKzwKz/PF6M+iGA/aklx4GLZg1prddhEPQtuXI1Q==",
"version": "5.3.0-next.1",
"resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-5.3.0-next.1.tgz",
"integrity": "sha512-q5o6vHHDi+HjFOFUNC288Dee5jyAO4mEufoOaF2wKCjVP1qoJGbnBalTNGuakJThrdn0RDa0XdHZgXKFyZomCQ==",
"requires": {
"semver": "^5.5.0",
"vscode-languageserver-protocol": "3.14.1"
"vscode-languageserver-protocol": "3.15.0-next.1"
}
},
"vscode-languageserver-protocol": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.14.1.tgz",
"integrity": "sha512-IL66BLb2g20uIKog5Y2dQ0IiigW0XKrvmWiOvc0yXw80z3tMEzEnHjaGAb3ENuU7MnQqgnYJ1Cl2l9RvNgDi4g==",
"version": "3.15.0-next.1",
"resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.0-next.1.tgz",
"integrity": "sha512-LXF0d9s3vxFBxVQ4aKl/XghdEMAncGt3dh4urIYa9Is43g3MfIQL9fC44YZtP+XXOrI2rpZU8lRNN01U1V6CDg==",
"requires": {
"vscode-jsonrpc": "^4.0.0",
"vscode-languageserver-types": "3.14.0"

View file

@ -31,7 +31,7 @@
"singleQuote": true
},
"dependencies": {
"vscode-languageclient": "^5.2.1"
"vscode-languageclient": "^5.3.0-next.1"
},
"devDependencies": {
"@types/mocha": "^5.2.5",

View file

@ -1,5 +1,6 @@
import * as lc from 'vscode-languageclient';
import { window } from 'vscode';
import { Config } from './config';
import { Highlighter } from './highlighting';
@ -19,16 +20,18 @@ export class Server {
run,
debug: run
};
const traceOutputChannel = window.createOutputChannel('Rust Analyzer Language Server Trace');
const clientOptions: lc.LanguageClientOptions = {
documentSelector: [{ scheme: 'file', language: 'rust' }],
initializationOptions: {
publishDecorations: true
}
},
traceOutputChannel
};
Server.client = new lc.LanguageClient(
'ra-lsp',
'rust-analyzer language server',
'Rust Analyzer Language Server',
serverOptions,
clientOptions
);