vscode-languageclient
Advanced tools
Comparing version 0.10.0 to 0.10.1
@@ -1,156 +0,5 @@ | ||
/*--------------------------------------------------------- | ||
* Copyright (C) Microsoft Corporation. All rights reserved. | ||
*--------------------------------------------------------*/ | ||
/* -------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
* ------------------------------------------------------------------------------------------ */ | ||
'use strict'; | ||
var vs = require('vscode'); | ||
var protocol_1 = require('./protocol'); | ||
var is = require('./utils/is'); | ||
function asOpenTextDocumentParams(textDocument) { | ||
return { | ||
uri: textDocument.uri.toString(), | ||
text: textDocument.getText() | ||
}; | ||
} | ||
exports.asOpenTextDocumentParams = asOpenTextDocumentParams; | ||
function isTextDocumentChangeEvent(value) { | ||
var candidate = value; | ||
return is.defined(candidate.document) && is.defined(candidate.contentChanges); | ||
} | ||
function isTextDocument(value) { | ||
var candidate = value; | ||
return is.defined(candidate.uri) && is.defined(candidate.version); | ||
} | ||
function asChangeTextDocumentParams(arg) { | ||
if (isTextDocument(arg)) { | ||
return { uri: arg.uri.toString(), text: arg.getText() }; | ||
} | ||
else if (isTextDocumentChangeEvent(arg)) { | ||
var result = []; | ||
var uri = arg.document.uri.toString(); | ||
return arg.contentChanges.map(function (change) { | ||
var range = change.range; | ||
return { | ||
uri: uri, | ||
range: { | ||
start: { line: range.start.line, character: range.start.character }, | ||
end: { line: range.end.line, character: range.end.line } | ||
}, | ||
rangeLength: change.rangeLength, | ||
text: change.text | ||
}; | ||
}); | ||
} | ||
else { | ||
throw Error('Unsupported text document change parameter'); | ||
} | ||
} | ||
exports.asChangeTextDocumentParams = asChangeTextDocumentParams; | ||
function asCloseTextDocumentParams(textDocument) { | ||
return { | ||
uri: textDocument.uri.toString() | ||
}; | ||
} | ||
exports.asCloseTextDocumentParams = asCloseTextDocumentParams; | ||
function asTextDocumentPosition(textDocument, position) { | ||
return { uri: textDocument.uri.toString(), position: asWorkerPosition(position) }; | ||
} | ||
exports.asTextDocumentPosition = asTextDocumentPosition; | ||
function asWorkerPosition(position) { | ||
return { line: position.line, character: position.character }; | ||
} | ||
exports.asWorkerPosition = asWorkerPosition; | ||
function asDiagnostics(diagnostics) { | ||
return diagnostics.map(function (diagnostic) { return new vs.Diagnostic(asRange(diagnostic.range), diagnostic.message, asDiagnosticSeverity(diagnostic.severity)); }); | ||
} | ||
exports.asDiagnostics = asDiagnostics; | ||
function asRange(value) { | ||
if (is.undefined(value)) { | ||
return undefined; | ||
} | ||
else if (is.nil(value)) { | ||
return null; | ||
} | ||
return new vs.Range(asPosition(value.start), asPosition(value.end)); | ||
} | ||
exports.asRange = asRange; | ||
function asPosition(value) { | ||
if (is.undefined(value)) { | ||
return undefined; | ||
} | ||
else if (is.nil(value)) { | ||
return null; | ||
} | ||
return new vs.Position(value.line, value.character); | ||
} | ||
exports.asPosition = asPosition; | ||
function asDiagnosticSeverity(value) { | ||
switch (value) { | ||
case protocol_1.DiagnosticSeverity.Error: | ||
return vs.DiagnosticSeverity.Error; | ||
case protocol_1.DiagnosticSeverity.Warning: | ||
return vs.DiagnosticSeverity.Warning; | ||
case protocol_1.DiagnosticSeverity.Information: | ||
return vs.DiagnosticSeverity.Information; | ||
case protocol_1.DiagnosticSeverity.Hint: | ||
return vs.DiagnosticSeverity.Hint; | ||
} | ||
} | ||
exports.asDiagnosticSeverity = asDiagnosticSeverity; | ||
function asHover(hover) { | ||
return new vs.Hover(hover.contents, is.defined(hover.range) ? asRange(hover.range) : undefined); | ||
} | ||
exports.asHover = asHover; | ||
function asCompletionItems(items) { | ||
return items.map(asCompletionItem); | ||
} | ||
exports.asCompletionItems = asCompletionItems; | ||
function set(value, func) { | ||
if (is.defined(value)) { | ||
func(); | ||
} | ||
} | ||
function asCompletionItem(item) { | ||
var result = new vs.CompletionItem(item.label); | ||
set(item.detail, function () { return result.detail = item.detail; }); | ||
set(item.documentation, function () { return result.documentation = item.documentation; }); | ||
set(item.filterText, function () { return result.filterText = item.filterText; }); | ||
set(item.insertText, function () { return result.insertText = item.insertText; }); | ||
set(item.kind, function () { return result.kind = item.kind; }); | ||
set(item.sortText, function () { return result.sortText = item.sortText; }); | ||
set(item.textEdit, function () { return result.textEdit = asTextEdit(item.textEdit); }); | ||
return result; | ||
} | ||
exports.asCompletionItem = asCompletionItem; | ||
function asTextEdit(edit) { | ||
return new vs.TextEdit(asRange(edit.range), edit.newText); | ||
} | ||
exports.asTextEdit = asTextEdit; | ||
function asSignatureHelp(item) { | ||
var result = new vs.SignatureHelp(); | ||
set(item.activeParameter, function () { return result.activeParameter = item.activeParameter; }); | ||
set(item.activeSignature, function () { return result.activeSignature = item.activeSignature; }); | ||
set(item.signatures, function () { return result.signatures = asSignatureInformations(item.signatures); }); | ||
return result; | ||
} | ||
exports.asSignatureHelp = asSignatureHelp; | ||
function asSignatureInformations(items) { | ||
return items.map(asSignatureInformation); | ||
} | ||
exports.asSignatureInformations = asSignatureInformations; | ||
function asSignatureInformation(item) { | ||
var result = new vs.SignatureInformation(item.label); | ||
set(item.documentation, function () { return result.documentation = item.documentation; }); | ||
set(item.parameters, function () { return result.parameters = asParameterInformations(item.parameters); }); | ||
return result; | ||
} | ||
exports.asSignatureInformation = asSignatureInformation; | ||
function asParameterInformations(item) { | ||
return item.map(asParameterInformation); | ||
} | ||
exports.asParameterInformations = asParameterInformations; | ||
function asParameterInformation(item) { | ||
var result = new vs.ParameterInformation(item.label); | ||
set(item.documentation, function () { return result.documentation = item.documentation; }); | ||
return result; | ||
} | ||
exports.asParameterInformation = asParameterInformation; |
@@ -94,2 +94,8 @@ import * as cp from 'child_process'; | ||
private hookCapabilities(connection); | ||
private hookCompletionProvider(documentSelector, connection); | ||
private hookHoverProvider(documentSelector, connection); | ||
private hookSignatureHelpProvider(documentSelector, connection); | ||
private hookDefinitionProvider(documentSelector, connection); | ||
private hookReferencesProvider(documentSelector, connection); | ||
private hookDocumentHighlightProvider(documentSelector, connection); | ||
} | ||
@@ -96,0 +102,0 @@ export declare class SettingMonitor { |
190
lib/main.js
@@ -1,4 +0,5 @@ | ||
/*--------------------------------------------------------- | ||
* Copyright (C) Microsoft Corporation. All rights reserved. | ||
*--------------------------------------------------------*/ | ||
/* -------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
* ------------------------------------------------------------------------------------------ */ | ||
'use strict'; | ||
@@ -9,3 +10,4 @@ var cp = require('child_process'); | ||
var protocol_1 = require('./protocol'); | ||
var converters_1 = require('./converters'); | ||
var c2p = require('./code2protocol'); | ||
var p2c = require('./protocol2code'); | ||
var is = require('./utils/is'); | ||
@@ -335,3 +337,3 @@ var electron = require('./utils/electron'); | ||
} | ||
connection.didOpenTextDocument(converters_1.asOpenTextDocumentParams(textDocument)); | ||
connection.didOpenTextDocument(c2p.asOpenTextDocumentParams(textDocument)); | ||
}; | ||
@@ -344,7 +346,7 @@ LanguageClient.prototype.onDidChangeTextDocument = function (connection, event) { | ||
if (this._capabilites.textDocumentSync === protocol_1.TextDocumentSyncKind.Incremental) { | ||
connection.didChangeTextDocument(converters_1.asChangeTextDocumentParams(event)); | ||
connection.didChangeTextDocument(c2p.asChangeTextDocumentParams(event)); | ||
} | ||
else { | ||
this._documentSyncDelayer.trigger(function () { | ||
connection.didChangeTextDocument(converters_1.asChangeTextDocumentParams(event.document)); | ||
connection.didChangeTextDocument(c2p.asChangeTextDocumentParams(event.document)); | ||
}, -1); | ||
@@ -357,3 +359,3 @@ } | ||
} | ||
connection.didCloseTextDocument(converters_1.asCloseTextDocumentParams(textDocument)); | ||
connection.didCloseTextDocument(c2p.asCloseTextDocumentParams(textDocument)); | ||
}; | ||
@@ -367,3 +369,3 @@ LanguageClient.prototype.forceDocumentSync = function () { | ||
var uri = vscode_1.Uri.parse(params.uri); | ||
var diagnostics = converters_1.asDiagnostics(params.diagnostics); | ||
var diagnostics = p2c.asDiagnostics(params.diagnostics); | ||
this._diagnostics.set(uri, diagnostics); | ||
@@ -526,3 +528,2 @@ }; | ||
LanguageClient.prototype.hookCapabilities = function (connection) { | ||
var _this = this; | ||
var documentSelector = this._languageOptions.documentSelector; | ||
@@ -532,61 +533,136 @@ if (!documentSelector) { | ||
} | ||
if (this._capabilites.hoverProvider) { | ||
this._providers.push(vscode_1.languages.registerHoverProvider(documentSelector, { | ||
provideHover: function (document, position, token) { | ||
this.hookCompletionProvider(documentSelector, connection); | ||
this.hookHoverProvider(documentSelector, connection); | ||
this.hookSignatureHelpProvider(documentSelector, connection); | ||
this.hookDefinitionProvider(documentSelector, connection); | ||
this.hookReferencesProvider(documentSelector, connection); | ||
this.hookDocumentHighlightProvider(documentSelector, connection); | ||
}; | ||
LanguageClient.prototype.hookCompletionProvider = function (documentSelector, connection) { | ||
var _this = this; | ||
if (!this._capabilites.completionProvider) { | ||
return; | ||
} | ||
this._providers.push(vscode_1.languages.registerCompletionItemProvider.apply(vscode_1.languages, [documentSelector, { | ||
provideCompletionItems: function (document, position, token) { | ||
if (_this.isConnectionActive()) { | ||
_this.forceDocumentSync(); | ||
return connection.sendRequest(protocol_1.CompletionRequest.type, c2p.asTextDocumentPosition(document, position)).then(function (result) { | ||
return p2c.asCompletionItems(result); | ||
}); | ||
} | ||
else { | ||
return Promise.resolve([]); | ||
} | ||
}, | ||
resolveCompletionItem: this._capabilites.completionProvider.resolveProvider | ||
? function (item, token) { | ||
if (_this.isConnectionActive()) { | ||
_this.forceDocumentSync(); | ||
return connection.sendRequest(protocol_1.HoverRequest.type, converters_1.asTextDocumentPosition(document, position)).then(function (result) { | ||
return converters_1.asHover(result); | ||
return connection.sendRequest(protocol_1.CompletionResolveRequest.type, c2p.asCompletionItem(item)).then(function (result) { | ||
return p2c.asCompletionItem(result); | ||
}); | ||
} | ||
else { | ||
return Promise.reject(new Error('Connection is not active anymore')); | ||
return Promise.resolve(item); | ||
} | ||
} | ||
})); | ||
: undefined | ||
}].concat(this._capabilites.completionProvider.triggerCharacters))); | ||
}; | ||
LanguageClient.prototype.hookHoverProvider = function (documentSelector, connection) { | ||
var _this = this; | ||
if (!this._capabilites.hoverProvider) { | ||
return; | ||
} | ||
if (this._capabilites.completionProvider) { | ||
this._providers.push(vscode_1.languages.registerCompletionItemProvider.apply(vscode_1.languages, [documentSelector, { | ||
provideCompletionItems: function (document, position, token) { | ||
if (_this.isConnectionActive()) { | ||
_this.forceDocumentSync(); | ||
return connection.sendRequest(protocol_1.CompletionRequest.type, converters_1.asTextDocumentPosition(document, position)).then(function (result) { | ||
return converters_1.asCompletionItems(result); | ||
}); | ||
} | ||
else { | ||
return Promise.resolve([]); | ||
} | ||
}, | ||
resolveCompletionItem: this._capabilites.completionProvider.resolveProvider | ||
? function (item, token) { | ||
if (_this.isConnectionActive()) { | ||
_this.forceDocumentSync(); | ||
return connection.sendRequest(protocol_1.CompletionResolveRequest.type, item).then(function (result) { | ||
return converters_1.asCompletionItem(result); | ||
}); | ||
} | ||
else { | ||
return Promise.resolve(item); | ||
} | ||
} | ||
: undefined | ||
}].concat(this._capabilites.completionProvider.triggerCharacters))); | ||
this._providers.push(vscode_1.languages.registerHoverProvider(documentSelector, { | ||
provideHover: function (document, position, token) { | ||
if (_this.isConnectionActive()) { | ||
_this.forceDocumentSync(); | ||
return connection.sendRequest(protocol_1.HoverRequest.type, c2p.asTextDocumentPosition(document, position)).then(function (result) { | ||
return p2c.asHover(result); | ||
}); | ||
} | ||
else { | ||
return Promise.reject(new Error('Connection is not active anymore')); | ||
} | ||
} | ||
})); | ||
}; | ||
LanguageClient.prototype.hookSignatureHelpProvider = function (documentSelector, connection) { | ||
var _this = this; | ||
if (!this._capabilites.signatureHelpProvider) { | ||
return; | ||
} | ||
if (this._capabilites.signatureHelpProvider) { | ||
this._providers.push(vscode_1.languages.registerSignatureHelpProvider.apply(vscode_1.languages, [documentSelector, { | ||
provideSignatureHelp: function (document, position, token) { | ||
if (_this.isConnectionActive()) { | ||
_this.forceDocumentSync(); | ||
return connection.sendRequest(protocol_1.SignatureHelpRequest.type, converters_1.asTextDocumentPosition(document, position)).then(function (result) { | ||
return converters_1.asSignatureHelp(result); | ||
}); | ||
} | ||
else { | ||
return Promise.resolve(null); | ||
} | ||
this._providers.push(vscode_1.languages.registerSignatureHelpProvider.apply(vscode_1.languages, [documentSelector, { | ||
provideSignatureHelp: function (document, position, token) { | ||
if (_this.isConnectionActive()) { | ||
_this.forceDocumentSync(); | ||
return connection.sendRequest(protocol_1.SignatureHelpRequest.type, c2p.asTextDocumentPosition(document, position)).then(function (result) { | ||
return p2c.asSignatureHelp(result); | ||
}); | ||
} | ||
}].concat(this._capabilites.signatureHelpProvider.triggerCharacters))); | ||
else { | ||
return Promise.resolve(null); | ||
} | ||
} | ||
}].concat(this._capabilites.signatureHelpProvider.triggerCharacters))); | ||
}; | ||
LanguageClient.prototype.hookDefinitionProvider = function (documentSelector, connection) { | ||
var _this = this; | ||
if (!this._capabilites.definitionProvider) { | ||
return; | ||
} | ||
this._providers.push(vscode_1.languages.registerDefinitionProvider(documentSelector, { | ||
provideDefinition: function (document, position, token) { | ||
if (_this.isConnectionActive()) { | ||
_this.forceDocumentSync(); | ||
return connection.sendRequest(protocol_1.DefinitionRequest.type, c2p.asTextDocumentPosition(document, position)).then(function (result) { | ||
return p2c.asDefinitionResult(result); | ||
}); | ||
} | ||
else { | ||
return Promise.resolve(null); | ||
} | ||
} | ||
})); | ||
}; | ||
LanguageClient.prototype.hookReferencesProvider = function (documentSelector, connection) { | ||
var _this = this; | ||
if (!this._capabilites.referencesProvider) { | ||
return; | ||
} | ||
this._providers.push(vscode_1.languages.registerReferenceProvider(documentSelector, { | ||
provideReferences: function (document, position, options, token) { | ||
if (_this.isConnectionActive()) { | ||
_this.forceDocumentSync(); | ||
return connection.sendRequest(protocol_1.ReferencesRequest.type, c2p.asReferenceParams(document, position, options)).then(function (result) { | ||
return p2c.asReferences(result); | ||
}); | ||
} | ||
else { | ||
return Promise.resolve(null); | ||
} | ||
} | ||
})); | ||
}; | ||
LanguageClient.prototype.hookDocumentHighlightProvider = function (documentSelector, connection) { | ||
var _this = this; | ||
if (!this._capabilites.documentHighlightProvider) { | ||
return; | ||
} | ||
this._providers.push(vscode_1.languages.registerDocumentHighlightProvider(documentSelector, { | ||
provideDocumentHighlights: function (document, position, token) { | ||
if (_this.isConnectionActive()) { | ||
_this.forceDocumentSync(); | ||
return connection.sendRequest(protocol_1.DocumentHighlightRequest.type, c2p.asTextDocumentPosition(document, position)).then(function (result) { | ||
return p2c.asDocumentHighlights(result); | ||
}); | ||
} | ||
else { | ||
Promise.resolve(null); | ||
} | ||
} | ||
})); | ||
}; | ||
return LanguageClient; | ||
@@ -593,0 +669,0 @@ })(); |
@@ -65,2 +65,8 @@ import { RequestType, NotificationType } from 'vscode-jsonrpc'; | ||
signatureHelpProvider?: SignatureHelpOptions; | ||
/** The server provides goto definition support. */ | ||
definitionProvider?: boolean; | ||
/** The server provides find references support. */ | ||
referencesProvider?: boolean; | ||
/** The server provides document highlight support. */ | ||
documentHighlightProvider?: boolean; | ||
} | ||
@@ -222,2 +228,10 @@ /** | ||
/** | ||
* Represents a location inside a resource, such as a line | ||
* inside a text file. | ||
*/ | ||
export declare class Location { | ||
uri: string; | ||
range: Range; | ||
} | ||
/** | ||
* A literal to identify a text document in the client. | ||
@@ -354,9 +368,9 @@ */ | ||
/** Reports an error. */ | ||
Error = 0, | ||
Error = 1, | ||
/** Reports a warning. */ | ||
Warning = 1, | ||
Warning = 2, | ||
/** Reports an information. */ | ||
Information = 2, | ||
Information = 3, | ||
/** Reports a hint. */ | ||
Hint = 3, | ||
Hint = 4, | ||
} | ||
@@ -386,20 +400,20 @@ /** | ||
export declare enum CompletionItemKind { | ||
Text = 0, | ||
Method = 1, | ||
Function = 2, | ||
Constructor = 3, | ||
Field = 4, | ||
Variable = 5, | ||
Class = 6, | ||
Interface = 7, | ||
Module = 8, | ||
Property = 9, | ||
Unit = 10, | ||
Value = 11, | ||
Enum = 12, | ||
Keyword = 13, | ||
Snippet = 14, | ||
Color = 15, | ||
File = 16, | ||
Reference = 17, | ||
Text = 1, | ||
Method = 2, | ||
Function = 3, | ||
Constructor = 4, | ||
Field = 5, | ||
Variable = 6, | ||
Class = 7, | ||
Interface = 8, | ||
Module = 9, | ||
Property = 10, | ||
Unit = 11, | ||
Value = 12, | ||
Enum = 13, | ||
Keyword = 14, | ||
Snippet = 15, | ||
Color = 16, | ||
File = 17, | ||
Reference = 18, | ||
} | ||
@@ -477,1 +491,28 @@ export interface CompletionItem { | ||
} | ||
/** | ||
* The definition of a symbol is one or many [locations](#Location) | ||
*/ | ||
export declare type Definition = Location | Location[]; | ||
export declare namespace DefinitionRequest { | ||
const type: RequestType<TextDocumentPosition, Definition, void>; | ||
} | ||
export interface ReferenceParams extends TextDocumentPosition { | ||
options: { | ||
includeDeclaration: boolean; | ||
}; | ||
} | ||
export declare namespace ReferencesRequest { | ||
const type: RequestType<ReferenceParams, Location[], void>; | ||
} | ||
export declare enum DocumentHighlightKind { | ||
Text = 1, | ||
Read = 2, | ||
Write = 3, | ||
} | ||
export interface DocumentHighlight { | ||
range: Range; | ||
kind?: number; | ||
} | ||
export declare namespace DocumentHighlightRequest { | ||
const type: RequestType<TextDocumentPosition, DocumentHighlight[], void>; | ||
} |
@@ -1,4 +0,5 @@ | ||
/*--------------------------------------------------------- | ||
* Copyright (C) Microsoft Corporation. All rights reserved. | ||
*--------------------------------------------------------*/ | ||
/* -------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
* ------------------------------------------------------------------------------------------ */ | ||
'use strict'; | ||
@@ -99,2 +100,12 @@ /** | ||
/** | ||
* Represents a location inside a resource, such as a line | ||
* inside a text file. | ||
*/ | ||
var Location = (function () { | ||
function Location() { | ||
} | ||
return Location; | ||
})(); | ||
exports.Location = Location; | ||
/** | ||
* The document open notification is sent from the client to the server to signal | ||
@@ -163,9 +174,9 @@ * newly opened text documents. The document's truth is now managed by the client | ||
/** Reports an error. */ | ||
DiagnosticSeverity[DiagnosticSeverity["Error"] = 0] = "Error"; | ||
DiagnosticSeverity[DiagnosticSeverity["Error"] = 1] = "Error"; | ||
/** Reports a warning. */ | ||
DiagnosticSeverity[DiagnosticSeverity["Warning"] = 1] = "Warning"; | ||
DiagnosticSeverity[DiagnosticSeverity["Warning"] = 2] = "Warning"; | ||
/** Reports an information. */ | ||
DiagnosticSeverity[DiagnosticSeverity["Information"] = 2] = "Information"; | ||
DiagnosticSeverity[DiagnosticSeverity["Information"] = 3] = "Information"; | ||
/** Reports a hint. */ | ||
DiagnosticSeverity[DiagnosticSeverity["Hint"] = 3] = "Hint"; | ||
DiagnosticSeverity[DiagnosticSeverity["Hint"] = 4] = "Hint"; | ||
})(exports.DiagnosticSeverity || (exports.DiagnosticSeverity = {})); | ||
@@ -175,20 +186,20 @@ var DiagnosticSeverity = exports.DiagnosticSeverity; | ||
(function (CompletionItemKind) { | ||
CompletionItemKind[CompletionItemKind["Text"] = 0] = "Text"; | ||
CompletionItemKind[CompletionItemKind["Method"] = 1] = "Method"; | ||
CompletionItemKind[CompletionItemKind["Function"] = 2] = "Function"; | ||
CompletionItemKind[CompletionItemKind["Constructor"] = 3] = "Constructor"; | ||
CompletionItemKind[CompletionItemKind["Field"] = 4] = "Field"; | ||
CompletionItemKind[CompletionItemKind["Variable"] = 5] = "Variable"; | ||
CompletionItemKind[CompletionItemKind["Class"] = 6] = "Class"; | ||
CompletionItemKind[CompletionItemKind["Interface"] = 7] = "Interface"; | ||
CompletionItemKind[CompletionItemKind["Module"] = 8] = "Module"; | ||
CompletionItemKind[CompletionItemKind["Property"] = 9] = "Property"; | ||
CompletionItemKind[CompletionItemKind["Unit"] = 10] = "Unit"; | ||
CompletionItemKind[CompletionItemKind["Value"] = 11] = "Value"; | ||
CompletionItemKind[CompletionItemKind["Enum"] = 12] = "Enum"; | ||
CompletionItemKind[CompletionItemKind["Keyword"] = 13] = "Keyword"; | ||
CompletionItemKind[CompletionItemKind["Snippet"] = 14] = "Snippet"; | ||
CompletionItemKind[CompletionItemKind["Color"] = 15] = "Color"; | ||
CompletionItemKind[CompletionItemKind["File"] = 16] = "File"; | ||
CompletionItemKind[CompletionItemKind["Reference"] = 17] = "Reference"; | ||
CompletionItemKind[CompletionItemKind["Text"] = 1] = "Text"; | ||
CompletionItemKind[CompletionItemKind["Method"] = 2] = "Method"; | ||
CompletionItemKind[CompletionItemKind["Function"] = 3] = "Function"; | ||
CompletionItemKind[CompletionItemKind["Constructor"] = 4] = "Constructor"; | ||
CompletionItemKind[CompletionItemKind["Field"] = 5] = "Field"; | ||
CompletionItemKind[CompletionItemKind["Variable"] = 6] = "Variable"; | ||
CompletionItemKind[CompletionItemKind["Class"] = 7] = "Class"; | ||
CompletionItemKind[CompletionItemKind["Interface"] = 8] = "Interface"; | ||
CompletionItemKind[CompletionItemKind["Module"] = 9] = "Module"; | ||
CompletionItemKind[CompletionItemKind["Property"] = 10] = "Property"; | ||
CompletionItemKind[CompletionItemKind["Unit"] = 11] = "Unit"; | ||
CompletionItemKind[CompletionItemKind["Value"] = 12] = "Value"; | ||
CompletionItemKind[CompletionItemKind["Enum"] = 13] = "Enum"; | ||
CompletionItemKind[CompletionItemKind["Keyword"] = 14] = "Keyword"; | ||
CompletionItemKind[CompletionItemKind["Snippet"] = 15] = "Snippet"; | ||
CompletionItemKind[CompletionItemKind["Color"] = 16] = "Color"; | ||
CompletionItemKind[CompletionItemKind["File"] = 17] = "File"; | ||
CompletionItemKind[CompletionItemKind["Reference"] = 18] = "Reference"; | ||
})(exports.CompletionItemKind || (exports.CompletionItemKind = {})); | ||
@@ -249,1 +260,20 @@ var CompletionItemKind = exports.CompletionItemKind; | ||
})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {})); | ||
var DefinitionRequest; | ||
(function (DefinitionRequest) { | ||
DefinitionRequest.type = { method: 'textDocument/definition' }; | ||
})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {})); | ||
var ReferencesRequest; | ||
(function (ReferencesRequest) { | ||
ReferencesRequest.type = { method: 'textDocument/references' }; | ||
})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {})); | ||
//---- Document Highlight ---------------------------------- | ||
(function (DocumentHighlightKind) { | ||
DocumentHighlightKind[DocumentHighlightKind["Text"] = 1] = "Text"; | ||
DocumentHighlightKind[DocumentHighlightKind["Read"] = 2] = "Read"; | ||
DocumentHighlightKind[DocumentHighlightKind["Write"] = 3] = "Write"; | ||
})(exports.DocumentHighlightKind || (exports.DocumentHighlightKind = {})); | ||
var DocumentHighlightKind = exports.DocumentHighlightKind; | ||
var DocumentHighlightRequest; | ||
(function (DocumentHighlightRequest) { | ||
DocumentHighlightRequest.type = { method: 'textDocument/documentHighlight' }; | ||
})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {})); |
@@ -1,4 +0,5 @@ | ||
/*--------------------------------------------------------- | ||
* Copyright (C) Microsoft Corporation. All rights reserved. | ||
*--------------------------------------------------------*/ | ||
/* -------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
* ------------------------------------------------------------------------------------------ */ | ||
'use strict'; | ||
@@ -5,0 +6,0 @@ var Delayer = (function () { |
@@ -1,4 +0,5 @@ | ||
/*--------------------------------------------------------- | ||
* Copyright (C) Microsoft Corporation. All rights reserved. | ||
*--------------------------------------------------------*/ | ||
/* -------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
* ------------------------------------------------------------------------------------------ */ | ||
'use strict'; | ||
@@ -5,0 +6,0 @@ var path = require('path'); |
@@ -0,1 +1,5 @@ | ||
/* -------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
* ------------------------------------------------------------------------------------------ */ | ||
var net = require('net'), fs = require('fs'), stream = require('stream'), util = require('util'); | ||
@@ -2,0 +6,0 @@ var ENABLE_LOGGING = false; |
@@ -1,4 +0,5 @@ | ||
/*--------------------------------------------------------- | ||
* Copyright (C) Microsoft Corporation. All rights reserved. | ||
*--------------------------------------------------------*/ | ||
/* -------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
* ------------------------------------------------------------------------------------------ */ | ||
'use strict'; | ||
@@ -5,0 +6,0 @@ var toString = Object.prototype.toString; |
@@ -1,4 +0,5 @@ | ||
/*--------------------------------------------------------- | ||
* Copyright (C) Microsoft Corporation. All rights reserved. | ||
*--------------------------------------------------------*/ | ||
/* -------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
* ------------------------------------------------------------------------------------------ */ | ||
'use strict'; | ||
@@ -5,0 +6,0 @@ var cp = require('child_process'); |
{ | ||
"name": "vscode-languageclient", | ||
"description": "VSCode Language client implementation", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"author": "Microsoft Corporation", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
97196
25
2321