-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
38 lines (32 loc) · 723 Bytes
/
server.js
File metadata and controls
38 lines (32 loc) · 723 Bytes
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
33
34
35
36
37
38
const {
createConnection,
TextDocuments,
ProposedFeatures,
CompletionItem,
CompletionItemKind
} = require('vscode-languageserver');
const connection = createConnection(ProposedFeatures.all);
const documents = new TextDocuments();
documents.listen(connection);
connection.onInitialize(() => {
return {
capabilities: {
textDocumentSync: documents.syncKind,
completionProvider: {
resolveProvider: true
}
}
};
});
connection.onCompletion(() => {
return [
];
});
connection.onCompletionResolve((item) => {
if (item.data === 1) {
//item.detail = 'Example details';
//item.documentation = 'Example documentation';
}
return item;
});
connection.listen();