Multi Server example cleanup

This commit is contained in:
Dirk Baeumer
2017-09-04 21:40:34 +02:00
parent f4196d9954
commit f5e0987c35
5 changed files with 22 additions and 7 deletions

View File

@ -12,5 +12,4 @@ The example uses proposed Language Server protocol. So the code demoed here migh
- Switch to the Debug viewlet
- Select `Launch Client` from the drop down
- Run the lauch config
- If you want to debug the server as well use the launch configuration `Attach to Server`
- If you want to debug the server as well use the launch configuration `Attach to Server`

View File

@ -9,27 +9,38 @@
"activationEvents": [
"onLanguage:plaintext"
],
"main": "./out/src/extension",
"contributes": {
"configuration": {
"type": "object",
"title": "Multi LSP configuration",
"properties": {
"lsp-multi-server-example.enable": {
"lspMultiServerSample.enable": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Controls the enablement."
},
"lsp-multi-server-example.options": {
"lspMultiServerSample.options": {
"scope": "resource",
"type": "object",
"default": {},
"description": "Additional options."
},
"lspMultiServerSample.trace.server": {
"scope": "window",
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Traces the communication between VSCode and the language server."
}
}
}
},
"main": "./out/extension",
"scripts": {
"vscode:prepublish": "tsc -p ./",
"compile": "tsc -p ./",

View File

@ -19,9 +19,9 @@ function getOuterMostWorkspaceFolder(folder: WorkspaceFolder): WorkspaceFolder {
return result;
}
export function activate(_context: ExtensionContext) {
export function activate(context: ExtensionContext) {
let module = path.join(__dirname, '..', 'server', 'server.js');
let module = context.asAbsolutePath(path.join('server', 'server.js'));
let outputChannel: OutputChannel = Window.createOutputChannel('lsp-multi-server-example');
function didOpenTextDocument(document: TextDocument): void {

View File

@ -6,6 +6,7 @@
"noImplicitReturns": true,
"module": "commonjs",
"target": "es6",
"rootDir": ".",
"outDir": "out",
"lib": [ "es6"],
"sourceMap": true

View File

@ -1,5 +1,9 @@
{
"compilerOptions": {
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",