-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.js
32 lines (27 loc) · 842 Bytes
/
client.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const path = require('path');
const vscode = require('vscode');
const {
LanguageClient,
TransportKind
} = require('vscode-languageclient/node');
function activate(context) {
const serverModule = context.asAbsolutePath(path.join('server', 'server.js'));
const serverOptions = {
run: { module: serverModule, transport: TransportKind.ipc },
debug: { module: serverModule, transport: TransportKind.ipc }
};
const clientOptions = {
documentSelector: [{ scheme: 'file', language: 'present' }],
synchronize: {
fileEvents: vscode.workspace.createFileSystemWatcher('**/.clientrc')
}
};
const client = new LanguageClient(
'languageServerPresent',
'Language Server for present',
serverOptions,
clientOptions
);
context.subscriptions.push(client.start());
}
exports.activate = activate;