vscode-languageserver-protocol
Advanced tools
Comparing version 3.15.0-next.6 to 3.15.0-next.7
@@ -1,3 +0,3 @@ | ||
import { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, MessageType as RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport } from 'vscode-jsonrpc'; | ||
export { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport, }; | ||
import { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, MessageType as RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, HandlerResult, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport, ProgressType, ProgressToken } from 'vscode-jsonrpc'; | ||
export { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, HandlerResult, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport, ProgressType, ProgressToken }; | ||
export * from 'vscode-languageserver-types'; | ||
@@ -12,3 +12,3 @@ export * from './protocol'; | ||
namespace CallHierarchyRequest { | ||
const type: RequestType<callHierarchy.CallHierarchyParams, callHierarchy.CallHierarchyCall[], void, import("./protocol").TextDocumentRegistrationOptions>; | ||
const type: RequestType<callHierarchy.CallHierarchyParams, callHierarchy.CallHierarchyCall[], void, callHierarchy.CallHierarchyRegistrationOptions>; | ||
type HandlerSignature = callHierarchy.CallHierarchyRequest.HandlerSignature; | ||
@@ -24,23 +24,19 @@ } | ||
type CallHierarchyCall = callHierarchy.CallHierarchyCall; | ||
type ProgressClientCapabilities = progress.ProgressClientCapabilities; | ||
type ProgressStartParams = progress.ProgressStartParams; | ||
namespace ProgressStartNotification { | ||
const type: NotificationType<progress.ProgressStartParams, void>; | ||
type HandlerSignature = progress.ProgressStartNotification.HandlerSignature; | ||
type WorkDoneProgressClientCapabilities = progress.WorkDoneProgressClientCapabilities; | ||
type WorkDoneProgressBegin = progress.WorkDoneProgressBegin; | ||
type WorkDoneProgressReport = progress.WorkDoneProgressReport; | ||
type WorkDoneProgressDone = progress.WorkDoneProgressDone; | ||
namespace WorkDoneProgress { | ||
const type: ProgressType<progress.WorkDoneProgressBegin | progress.WorkDoneProgressReport | progress.WorkDoneProgressDone>; | ||
} | ||
type ProgressReportParams = progress.ProgressReportParams; | ||
namespace ProgressReportNotification { | ||
const type: NotificationType<progress.ProgressReportParams, void>; | ||
type HandlerSignature = progress.ProgressReportNotification.HandlerSignature; | ||
type WorkDoneProgressCreateParams = progress.WorkDoneProgressCreateParams; | ||
namespace WorkDoneProgressCreateRequest { | ||
const type: RequestType<progress.WorkDoneProgressCreateParams, void, void, void>; | ||
type HandlerSignature = progress.WorkDoneProgressCreateRequest.HandlerSignature; | ||
} | ||
type ProgressDoneParams = progress.ProgressDoneParams; | ||
namespace ProgressDoneNotification { | ||
const type: NotificationType<progress.ProgressDoneParams, void>; | ||
type HandlerSignature = progress.ProgressDoneNotification.HandlerSignature; | ||
type WorkDoneProgressCancelParams = progress.WorkDoneProgressCancelParams; | ||
namespace WorkDoneProgressCancelNotification { | ||
const type: NotificationType<progress.WorkDoneProgressCancelParams, void>; | ||
type HandlerSignature = progress.WorkDoneProgressCancelNotification.HandlerSignature; | ||
} | ||
type ProgressCancelParams = progress.ProgressCancelParams; | ||
namespace ProgressCancelNotification { | ||
const type: NotificationType<progress.ProgressCancelParams, void>; | ||
type HandlerSignature = progress.ProgressCancelNotification.HandlerSignature; | ||
} | ||
} | ||
@@ -151,2 +147,16 @@ export interface ProtocolConnection { | ||
/** | ||
* Installs a progress handler for a given token. | ||
* @param type the progress type | ||
* @param token the token | ||
* @param handler the handler | ||
*/ | ||
onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P>): Disposable; | ||
/** | ||
* Sends progress. | ||
* @param type the progress type | ||
* @param token the token to use | ||
* @param value the progress value | ||
*/ | ||
sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): void; | ||
/** | ||
* Enables tracing mode for the connection. | ||
@@ -153,0 +163,0 @@ */ |
@@ -38,2 +38,3 @@ /* -------------------------------------------------------------------------------------------- | ||
exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport; | ||
exports.ProgressType = vscode_jsonrpc_1.ProgressType; | ||
__export(require("vscode-languageserver-types")); | ||
@@ -54,18 +55,15 @@ __export(require("./protocol")); | ||
})(CallHierarchyDirection = Proposed.CallHierarchyDirection || (Proposed.CallHierarchyDirection = {})); | ||
let ProgressStartNotification; | ||
(function (ProgressStartNotification) { | ||
ProgressStartNotification.type = progress.ProgressStartNotification.type; | ||
})(ProgressStartNotification = Proposed.ProgressStartNotification || (Proposed.ProgressStartNotification = {})); | ||
let ProgressReportNotification; | ||
(function (ProgressReportNotification) { | ||
ProgressReportNotification.type = progress.ProgressReportNotification.type; | ||
})(ProgressReportNotification = Proposed.ProgressReportNotification || (Proposed.ProgressReportNotification = {})); | ||
let ProgressDoneNotification; | ||
(function (ProgressDoneNotification) { | ||
ProgressDoneNotification.type = progress.ProgressDoneNotification.type; | ||
})(ProgressDoneNotification = Proposed.ProgressDoneNotification || (Proposed.ProgressDoneNotification = {})); | ||
let ProgressCancelNotification; | ||
(function (ProgressCancelNotification) { | ||
ProgressCancelNotification.type = progress.ProgressCancelNotification.type; | ||
})(ProgressCancelNotification = Proposed.ProgressCancelNotification || (Proposed.ProgressCancelNotification = {})); | ||
// export type ProgressServerCapabilities = progress.ProgressServerCapabilities; | ||
let WorkDoneProgress; | ||
(function (WorkDoneProgress) { | ||
WorkDoneProgress.type = progress.WorkDoneProgress.type; | ||
})(WorkDoneProgress = Proposed.WorkDoneProgress || (Proposed.WorkDoneProgress = {})); | ||
let WorkDoneProgressCreateRequest; | ||
(function (WorkDoneProgressCreateRequest) { | ||
WorkDoneProgressCreateRequest.type = progress.WorkDoneProgressCreateRequest.type; | ||
})(WorkDoneProgressCreateRequest = Proposed.WorkDoneProgressCreateRequest || (Proposed.WorkDoneProgressCreateRequest = {})); | ||
let WorkDoneProgressCancelNotification; | ||
(function (WorkDoneProgressCancelNotification) { | ||
WorkDoneProgressCancelNotification.type = progress.WorkDoneProgressCancelNotification.type; | ||
})(WorkDoneProgressCancelNotification = Proposed.WorkDoneProgressCancelNotification || (Proposed.WorkDoneProgressCancelNotification = {})); | ||
})(Proposed = exports.Proposed || (exports.Proposed = {})); | ||
@@ -72,0 +70,0 @@ function createProtocolConnection(reader, writer, logger, strategy) { |
@@ -1,4 +0,4 @@ | ||
import { RequestType, RequestHandler } from 'vscode-jsonrpc'; | ||
import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc'; | ||
import { SymbolKind, Range } from 'vscode-languageserver-types'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams } from './protocol'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; | ||
export interface CallHierarchyClientCapabilities { | ||
@@ -22,2 +22,6 @@ /** | ||
} | ||
export interface CallHierarchyOptions extends WorkDoneProgressOptions { | ||
} | ||
export interface CallHierarchyRegistrationOptions extends TextDocumentRegistrationOptions, CallHierarchyOptions { | ||
} | ||
export interface CallHierarchyServerCapabilities { | ||
@@ -27,3 +31,3 @@ /** | ||
*/ | ||
callHierarchyProvider?: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions); | ||
callHierarchyProvider?: boolean | CallHierarchyOptions | (CallHierarchyRegistrationOptions & StaticRegistrationOptions); | ||
} | ||
@@ -33,3 +37,3 @@ /** | ||
*/ | ||
export interface CallHierarchyParams extends TextDocumentPositionParams { | ||
export interface CallHierarchyParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { | ||
/** | ||
@@ -109,4 +113,5 @@ * The direction of calls to provide. | ||
export declare namespace CallHierarchyRequest { | ||
const type: RequestType<CallHierarchyParams, CallHierarchyCall[], void, TextDocumentRegistrationOptions>; | ||
const type: RequestType<CallHierarchyParams, CallHierarchyCall[], void, CallHierarchyRegistrationOptions>; | ||
const resultType: ProgressType<CallHierarchyCall[]>; | ||
type HandlerSignature = RequestHandler<CallHierarchyParams, CallHierarchyCall[] | null, void>; | ||
} |
@@ -33,2 +33,3 @@ /* -------------------------------------------------------------------------------------------- | ||
CallHierarchyRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/callHierarchy'); | ||
CallHierarchyRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(CallHierarchyRequest = exports.CallHierarchyRequest || (exports.CallHierarchyRequest = {})); |
@@ -1,3 +0,3 @@ | ||
import { RequestType } from 'vscode-jsonrpc'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol'; | ||
import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; | ||
import { TextDocumentIdentifier, Range, Color, ColorInformation, ColorPresentation } from 'vscode-languageserver-types'; | ||
@@ -15,3 +15,3 @@ export interface ColorClientCapabilities { | ||
* Whether implementation supports dynamic registration. If this is set to `true` | ||
* the client supports the new `(ColorProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions)` | ||
* the client supports the new `(ColorRegistrationOptions & StaticRegistrationOptions)` | ||
* return value for the corresponding server capability as well. | ||
@@ -23,4 +23,6 @@ */ | ||
} | ||
export interface ColorProviderOptions { | ||
export interface ColorOptions extends WorkDoneProgressOptions { | ||
} | ||
export interface ColorRegistrationOptions extends TextDocumentRegistrationOptions, ColorOptions { | ||
} | ||
export interface ColorServerCapabilities { | ||
@@ -30,3 +32,3 @@ /** | ||
*/ | ||
colorProvider?: boolean | ColorProviderOptions | (ColorProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions); | ||
colorProvider?: boolean | ColorOptions | (ColorRegistrationOptions & StaticRegistrationOptions); | ||
} | ||
@@ -36,3 +38,3 @@ /** | ||
*/ | ||
export interface DocumentColorParams { | ||
export interface DocumentColorParams extends WorkDoneProgressParams, PartialResultParams { | ||
/** | ||
@@ -50,3 +52,5 @@ * The text document. | ||
export declare namespace DocumentColorRequest { | ||
const type: RequestType<DocumentColorParams, ColorInformation[], void, TextDocumentRegistrationOptions>; | ||
const type: RequestType<DocumentColorParams, ColorInformation[], void, ColorRegistrationOptions>; | ||
const resultType: ProgressType<ColorInformation[]>; | ||
type HandlerSignature = RequestHandler<DocumentColorParams, ColorInformation[], void>; | ||
} | ||
@@ -56,3 +60,3 @@ /** | ||
*/ | ||
export interface ColorPresentationParams { | ||
export interface ColorPresentationParams extends WorkDoneProgressParams, PartialResultParams { | ||
/** | ||
@@ -78,3 +82,4 @@ * The text document. | ||
export declare namespace ColorPresentationRequest { | ||
const type: RequestType<ColorPresentationParams, ColorPresentation[], void, TextDocumentRegistrationOptions>; | ||
const type: RequestType<ColorPresentationParams, ColorPresentation[], void, WorkDoneProgressOptions & TextDocumentRegistrationOptions>; | ||
type HandlerSignature = RequestHandler<ColorPresentationParams, ColorPresentation[], void>; | ||
} |
@@ -17,2 +17,3 @@ /* -------------------------------------------------------------------------------------------- | ||
DocumentColorRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentColor'); | ||
DocumentColorRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {})); | ||
@@ -19,0 +20,0 @@ /** |
import { RequestType, RequestHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc'; | ||
import { PartialResultParams } from './protocol'; | ||
export interface ConfigurationClientCapabilities { | ||
@@ -23,3 +24,3 @@ /** | ||
export declare namespace ConfigurationRequest { | ||
const type: RequestType<ConfigurationParams, any[], void, void>; | ||
const type: RequestType<ConfigurationParams & PartialResultParams, any[], void, void>; | ||
type HandlerSignature = RequestHandler<ConfigurationParams, any[], void>; | ||
@@ -26,0 +27,0 @@ type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<any[], void>; |
@@ -0,0 +0,0 @@ /* -------------------------------------------------------------------------------------------- |
@@ -1,4 +0,4 @@ | ||
import { RequestType, RequestHandler } from 'vscode-jsonrpc'; | ||
import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc'; | ||
import { Declaration, DeclarationLink, Location, LocationLink } from 'vscode-languageserver-types'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams } from './protocol'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; | ||
export interface DeclarationClientCapabilities { | ||
@@ -26,2 +26,6 @@ /** | ||
} | ||
export interface DeclarationOptions extends WorkDoneProgressOptions { | ||
} | ||
export interface DeclarationRegistrationOptions extends TextDocumentRegistrationOptions, DeclarationOptions { | ||
} | ||
export interface DeclarationServerCapabilities { | ||
@@ -31,4 +35,6 @@ /** | ||
*/ | ||
declarationProvider?: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions); | ||
declarationProvider?: boolean | DeclarationOptions | (DeclarationRegistrationOptions & StaticRegistrationOptions); | ||
} | ||
export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { | ||
} | ||
/** | ||
@@ -42,4 +48,5 @@ * A request to resolve the type definition locations of a symbol at a given text | ||
export declare namespace DeclarationRequest { | ||
const type: RequestType<TextDocumentPositionParams, Location | Location[] | LocationLink[] | null, void, TextDocumentRegistrationOptions>; | ||
type HandlerSignature = RequestHandler<TextDocumentPositionParams, Declaration | DeclarationLink[] | null, void>; | ||
const type: RequestType<DeclarationParams, Location | Location[] | LocationLink[] | null, void, DeclarationRegistrationOptions>; | ||
const resultType: ProgressType<Location[] | LocationLink[]>; | ||
type HandlerSignature = RequestHandler<DeclarationParams, Declaration | DeclarationLink[] | null, void>; | ||
} |
@@ -20,2 +20,3 @@ /* -------------------------------------------------------------------------------------------- | ||
DeclarationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/declaration'); | ||
DeclarationRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {})); |
@@ -1,4 +0,4 @@ | ||
import { RequestType } from 'vscode-jsonrpc'; | ||
import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc'; | ||
import { TextDocumentIdentifier } from 'vscode-languageserver-types'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; | ||
export interface FoldingRangeClientCapabilities { | ||
@@ -32,4 +32,6 @@ /** | ||
} | ||
export interface FoldingRangeProviderOptions { | ||
export interface FoldingRangeOptions extends WorkDoneProgressOptions { | ||
} | ||
export interface FoldingRangeRegistrationOptions extends TextDocumentRegistrationOptions, FoldingRangeOptions { | ||
} | ||
export interface FoldingRangeServerCapabilities { | ||
@@ -39,3 +41,3 @@ /** | ||
*/ | ||
foldingRangeProvider?: boolean | FoldingRangeProviderOptions | (FoldingRangeProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions); | ||
foldingRangeProvider?: boolean | FoldingRangeOptions | (FoldingRangeRegistrationOptions & StaticRegistrationOptions); | ||
} | ||
@@ -89,3 +91,3 @@ /** | ||
*/ | ||
export interface FoldingRangeParams { | ||
export interface FoldingRangeParams extends WorkDoneProgressParams, PartialResultParams { | ||
/** | ||
@@ -103,3 +105,5 @@ * The text document. | ||
export declare namespace FoldingRangeRequest { | ||
const type: RequestType<FoldingRangeParams, FoldingRange[] | null, any, any>; | ||
const type: RequestType<FoldingRangeParams, FoldingRange[] | null, any, FoldingRangeRegistrationOptions>; | ||
const resultType: ProgressType<FoldingRange[]>; | ||
type HandlerSignature = RequestHandler<FoldingRangeParams, FoldingRange[] | null, void>; | ||
} |
@@ -35,2 +35,3 @@ "use strict"; | ||
FoldingRangeRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/foldingRange'); | ||
FoldingRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {})); |
@@ -1,4 +0,4 @@ | ||
import { RequestType, RequestHandler } from 'vscode-jsonrpc'; | ||
import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc'; | ||
import { Definition, DefinitionLink, Location, LocationLink } from 'vscode-languageserver-types'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams } from './protocol'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; | ||
export interface ImplementationClientCapabilities { | ||
@@ -26,2 +26,6 @@ /** | ||
} | ||
export interface ImplementationOptions extends WorkDoneProgressOptions { | ||
} | ||
export interface ImplementationRegistrationOptions extends TextDocumentRegistrationOptions, ImplementationOptions { | ||
} | ||
export interface ImplementationServerCapabilities { | ||
@@ -31,4 +35,6 @@ /** | ||
*/ | ||
implementationProvider?: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions); | ||
implementationProvider?: boolean | ImplementationOptions | (ImplementationRegistrationOptions & StaticRegistrationOptions); | ||
} | ||
export interface ImplementationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { | ||
} | ||
/** | ||
@@ -41,4 +47,5 @@ * A request to resolve the implementation locations of a symbol at a given text | ||
export declare namespace ImplementationRequest { | ||
const type: RequestType<TextDocumentPositionParams, Location | Location[] | LocationLink[] | null, void, TextDocumentRegistrationOptions>; | ||
type HandlerSignature = RequestHandler<TextDocumentPositionParams, Definition | DefinitionLink[] | null, void>; | ||
const type: RequestType<ImplementationParams, Location | Location[] | LocationLink[] | null, void, ImplementationRegistrationOptions>; | ||
const resultType: ProgressType<Location[] | LocationLink[]>; | ||
type HandlerSignature = RequestHandler<ImplementationParams, Definition | DefinitionLink[] | null, void>; | ||
} |
@@ -19,2 +19,3 @@ /* -------------------------------------------------------------------------------------------- | ||
ImplementationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/implementation'); | ||
ImplementationRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {})); |
@@ -29,6 +29,10 @@ /* -------------------------------------------------------------------------------------------- | ||
let __noDynamicImport; | ||
/** | ||
* The DocumentFilter namespace provides helper functions to work with | ||
* [DocumentFilter](#DocumentFilter) literals. | ||
*/ | ||
var DocumentFilter; | ||
(function (DocumentFilter) { | ||
function is(value) { | ||
let candidate = value; | ||
const candidate = value; | ||
return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern); | ||
@@ -39,2 +43,21 @@ } | ||
/** | ||
* The DocumentSelector namespace provides helper functions to work with | ||
* [DocumentSelector](#DocumentSelector)s. | ||
*/ | ||
var DocumentSelector; | ||
(function (DocumentSelector) { | ||
function is(value) { | ||
if (!Array.isArray(value)) { | ||
return false; | ||
} | ||
for (let elem of value) { | ||
if (!Is.string(elem) && !DocumentFilter.is(elem)) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
DocumentSelector.is = is; | ||
})(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {})); | ||
/** | ||
* The `client/registerCapability` request is sent from the server to the client to register a new capability | ||
@@ -117,2 +140,43 @@ * handler on the client side. | ||
/** | ||
* The StaticRegistrationOptions namespace provides helper functions to work with | ||
* [StaticRegistrationOptions](#StaticRegistrationOptions) literals. | ||
*/ | ||
var StaticRegistrationOptions; | ||
(function (StaticRegistrationOptions) { | ||
function hasId(value) { | ||
const candidate = value; | ||
return candidate && Is.string(candidate.id) && candidate.id.length > 0; | ||
} | ||
StaticRegistrationOptions.hasId = hasId; | ||
})(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {})); | ||
/** | ||
* The TextDocumentRegistrationOptions namespace provides helper functions to work with | ||
* [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals. | ||
*/ | ||
var TextDocumentRegistrationOptions; | ||
(function (TextDocumentRegistrationOptions) { | ||
function is(value) { | ||
const candidate = value; | ||
return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector)); | ||
} | ||
TextDocumentRegistrationOptions.is = is; | ||
})(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {})); | ||
/** | ||
* The WorkDoneProgressOptions namespace provides helper functions to work with | ||
* [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals. | ||
*/ | ||
var WorkDoneProgressOptions; | ||
(function (WorkDoneProgressOptions) { | ||
function is(value) { | ||
const candidate = value; | ||
return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress)); | ||
} | ||
WorkDoneProgressOptions.is = is; | ||
function hasWorkDoneProgress(value) { | ||
const candidate = value; | ||
return candidate && Is.boolean(candidate.workDoneProgress); | ||
} | ||
WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress; | ||
})(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {})); | ||
/** | ||
* The initialize request is sent from the client to the server. | ||
@@ -349,2 +413,3 @@ * It is sent once as the request after starting up the server. | ||
})(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {})); | ||
//---- Completion Support -------------------------- | ||
/** | ||
@@ -384,2 +449,3 @@ * How a completion was triggered | ||
CompletionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/completion'); | ||
CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {})); | ||
@@ -395,3 +461,2 @@ /** | ||
})(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {})); | ||
//---- Hover Support ------------------------------- | ||
/** | ||
@@ -410,3 +475,2 @@ * Request to request hover information at a given text document position. The request's | ||
})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {})); | ||
//---- Goto Definition ------------------------------------- | ||
/** | ||
@@ -422,2 +486,3 @@ * A request to resolve the definition location of a symbol at a given text | ||
DefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/definition'); | ||
DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {})); | ||
@@ -433,4 +498,4 @@ /** | ||
ReferencesRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/references'); | ||
ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {})); | ||
//---- Document Highlight ---------------------------------- | ||
/** | ||
@@ -445,4 +510,4 @@ * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given | ||
DocumentHighlightRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentHighlight'); | ||
DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {})); | ||
//---- Document Symbol Provider --------------------------- | ||
/** | ||
@@ -457,4 +522,4 @@ * A request to list all symbols found in a given text document. The request's | ||
DocumentSymbolRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentSymbol'); | ||
DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {})); | ||
//---- Workspace Symbol Provider --------------------------- | ||
/** | ||
@@ -469,2 +534,3 @@ * A request to list project-wide symbols matching the query string given | ||
WorkspaceSymbolRequest.type = new vscode_jsonrpc_1.RequestType('workspace/symbol'); | ||
WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {})); | ||
@@ -477,2 +543,3 @@ /** | ||
CodeActionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeAction'); | ||
CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {})); | ||
@@ -485,2 +552,3 @@ /** | ||
CodeLensRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeLens'); | ||
CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {})); | ||
@@ -535,2 +603,3 @@ /** | ||
DocumentLinkRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentLink'); | ||
DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {})); | ||
@@ -537,0 +606,0 @@ /** |
@@ -1,3 +0,3 @@ | ||
import { NotificationType, NotificationHandler } from 'vscode-jsonrpc'; | ||
export interface ProgressClientCapabilities { | ||
import { NotificationType, NotificationHandler, RequestType, RequestHandler, ProgressType, ProgressToken } from 'vscode-jsonrpc'; | ||
export interface WorkDoneProgressClientCapabilities { | ||
/** | ||
@@ -10,12 +10,8 @@ * Window specific client capabilities. | ||
*/ | ||
progress?: boolean; | ||
workDoneProgress?: boolean; | ||
}; | ||
} | ||
export interface ProgressStartParams { | ||
export interface WorkDoneProgressBegin { | ||
kind: 'begin'; | ||
/** | ||
* A unique identifier to associate multiple progress notifications with | ||
* the same progress. | ||
*/ | ||
id: string; | ||
/** | ||
* Mandatory title of the progress operation. Used to briefly inform about | ||
@@ -51,15 +47,12 @@ * the kind of operation being performed. | ||
} | ||
/** | ||
* The `window/progress/start` notification is sent from the server to the client | ||
* to initiate a progress. | ||
*/ | ||
export declare namespace ProgressStartNotification { | ||
const type: NotificationType<ProgressStartParams, void>; | ||
type HandlerSignature = NotificationHandler<ProgressStartParams>; | ||
} | ||
export interface ProgressReportParams { | ||
export interface WorkDoneProgressReport { | ||
kind: 'report'; | ||
/** | ||
* A unique identifier to associate multiple progress notifications with the same progress. | ||
* Controls enablement state of a cancel button. This property is only valid if a cancel | ||
* button got requested in the `WorkDoneProgressStart` payload. | ||
* | ||
* Clients that don't support cancellation or don't support control the button's | ||
* enablement state are allowed to ignore the setting. | ||
*/ | ||
id: string; | ||
cancellable?: boolean; | ||
/** | ||
@@ -83,37 +76,40 @@ * Optional, more detailed associated progress message. Contains | ||
} | ||
/** | ||
* The `window/progress/report` notification is sent from the server to the client | ||
* to initiate a progress. | ||
*/ | ||
export declare namespace ProgressReportNotification { | ||
const type: NotificationType<ProgressReportParams, void>; | ||
type HandlerSignature = NotificationHandler<ProgressReportParams>; | ||
export interface WorkDoneProgressDone { | ||
kind: 'done'; | ||
/** | ||
* Optional, a final message indicating to for example indicate the outcome | ||
* of the operation. | ||
*/ | ||
message?: string; | ||
} | ||
export interface ProgressDoneParams { | ||
export declare namespace WorkDoneProgress { | ||
const type: ProgressType<WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressDone>; | ||
} | ||
export interface WorkDoneProgressCreateParams { | ||
/** | ||
* A unique identifier to associate multiple progress notifications with the same progress. | ||
* The token to be used to report progress. | ||
*/ | ||
id: string; | ||
token: ProgressToken; | ||
} | ||
/** | ||
* The `window/progress/done` notification is sent from the server to the client | ||
* to initiate a progress. | ||
* The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress | ||
* reporting from the server. | ||
*/ | ||
export declare namespace ProgressDoneNotification { | ||
const type: NotificationType<ProgressDoneParams, void>; | ||
type HandlerSignature = NotificationHandler<ProgressDoneParams>; | ||
export declare namespace WorkDoneProgressCreateRequest { | ||
const type: RequestType<WorkDoneProgressCreateParams, void, void, void>; | ||
type HandlerSignature = RequestHandler<WorkDoneProgressCreateParams, void, void>; | ||
} | ||
export interface ProgressCancelParams { | ||
export interface WorkDoneProgressCancelParams { | ||
/** | ||
* A unique identifier to associate multiple progress notifications with the same progress. | ||
* The token to be used to report progress. | ||
*/ | ||
id: string; | ||
token: ProgressToken; | ||
} | ||
/** | ||
* The `window/progress/cancel` notification is sent client to the server to cancel a progress | ||
* The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress | ||
* initiated on the server side. | ||
*/ | ||
export declare namespace ProgressCancelNotification { | ||
const type: NotificationType<ProgressCancelParams, void>; | ||
type HandlerSignature = NotificationHandler<ProgressCancelParams>; | ||
export declare namespace WorkDoneProgressCancelNotification { | ||
const type: NotificationType<WorkDoneProgressCancelParams, void>; | ||
type HandlerSignature = NotificationHandler<WorkDoneProgressCancelParams>; | ||
} |
@@ -8,33 +8,21 @@ /* -------------------------------------------------------------------------------------------- | ||
const vscode_jsonrpc_1 = require("vscode-jsonrpc"); | ||
var WorkDoneProgress; | ||
(function (WorkDoneProgress) { | ||
WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType(); | ||
})(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {})); | ||
/** | ||
* The `window/progress/start` notification is sent from the server to the client | ||
* to initiate a progress. | ||
* The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress | ||
* reporting from the server. | ||
*/ | ||
var ProgressStartNotification; | ||
(function (ProgressStartNotification) { | ||
ProgressStartNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/start'); | ||
})(ProgressStartNotification = exports.ProgressStartNotification || (exports.ProgressStartNotification = {})); | ||
var WorkDoneProgressCreateRequest; | ||
(function (WorkDoneProgressCreateRequest) { | ||
WorkDoneProgressCreateRequest.type = new vscode_jsonrpc_1.RequestType('window/workDoneProgress/create'); | ||
})(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {})); | ||
/** | ||
* The `window/progress/report` notification is sent from the server to the client | ||
* to initiate a progress. | ||
*/ | ||
var ProgressReportNotification; | ||
(function (ProgressReportNotification) { | ||
ProgressReportNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/report'); | ||
})(ProgressReportNotification = exports.ProgressReportNotification || (exports.ProgressReportNotification = {})); | ||
/** | ||
* The `window/progress/done` notification is sent from the server to the client | ||
* to initiate a progress. | ||
*/ | ||
var ProgressDoneNotification; | ||
(function (ProgressDoneNotification) { | ||
ProgressDoneNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/done'); | ||
})(ProgressDoneNotification = exports.ProgressDoneNotification || (exports.ProgressDoneNotification = {})); | ||
/** | ||
* The `window/progress/cancel` notification is sent client to the server to cancel a progress | ||
* The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress | ||
* initiated on the server side. | ||
*/ | ||
var ProgressCancelNotification; | ||
(function (ProgressCancelNotification) { | ||
ProgressCancelNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/cancel'); | ||
})(ProgressCancelNotification = exports.ProgressCancelNotification || (exports.ProgressCancelNotification = {})); | ||
var WorkDoneProgressCancelNotification; | ||
(function (WorkDoneProgressCancelNotification) { | ||
WorkDoneProgressCancelNotification.type = new vscode_jsonrpc_1.NotificationType('window/workDoneProgress/cancel'); | ||
})(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {})); |
@@ -1,4 +0,4 @@ | ||
import { RequestType, RequestHandler } from 'vscode-jsonrpc'; | ||
import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc'; | ||
import { TextDocumentIdentifier, Position, SelectionRange } from 'vscode-languageserver-types'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol'; | ||
import { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams, PartialResultParams } from './protocol'; | ||
export interface SelectionRangeClientCapabilities { | ||
@@ -22,4 +22,6 @@ /** | ||
} | ||
export interface SelectionRangeProviderOptions { | ||
export interface SelectionRangeOptions extends WorkDoneProgressOptions { | ||
} | ||
export interface SelectionRangeRegistrationOptions extends SelectionRangeOptions, TextDocumentRegistrationOptions { | ||
} | ||
export interface SelectionRangeServerCapabilities { | ||
@@ -29,3 +31,3 @@ /** | ||
*/ | ||
selectionRangeProvider?: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions & SelectionRangeProviderOptions); | ||
selectionRangeProvider?: boolean | SelectionRangeOptions | (SelectionRangeRegistrationOptions & StaticRegistrationOptions); | ||
} | ||
@@ -35,3 +37,3 @@ /** | ||
*/ | ||
export interface SelectionRangeParams { | ||
export interface SelectionRangeParams extends WorkDoneProgressParams, PartialResultParams { | ||
/** | ||
@@ -53,4 +55,5 @@ * The text document. | ||
export declare namespace SelectionRangeRequest { | ||
const type: RequestType<SelectionRangeParams, SelectionRange[] | null, any, any>; | ||
const type: RequestType<SelectionRangeParams, SelectionRange[] | null, any, SelectionRangeRegistrationOptions>; | ||
const resultType: ProgressType<SelectionRange[]>; | ||
type HandlerSignature = RequestHandler<SelectionRangeParams, SelectionRange[] | null, void>; | ||
} |
@@ -17,2 +17,3 @@ "use strict"; | ||
SelectionRangeRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/selectionRange'); | ||
SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {})); |
@@ -1,4 +0,4 @@ | ||
import { RequestType, RequestHandler } from 'vscode-jsonrpc'; | ||
import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc'; | ||
import { Definition, DefinitionLink, LocationLink, Location } from 'vscode-languageserver-types'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams } from './protocol'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; | ||
export interface TypeDefinitionClientCapabilities { | ||
@@ -26,2 +26,6 @@ /** | ||
} | ||
export interface TypeDefinitionOptions extends WorkDoneProgressOptions { | ||
} | ||
export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions { | ||
} | ||
export interface TypeDefinitionServerCapabilities { | ||
@@ -31,4 +35,6 @@ /** | ||
*/ | ||
typeDefinitionProvider?: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions); | ||
typeDefinitionProvider?: boolean | TypeDefinitionOptions | (TypeDefinitionRegistrationOptions & StaticRegistrationOptions); | ||
} | ||
export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { | ||
} | ||
/** | ||
@@ -41,4 +47,5 @@ * A request to resolve the type definition locations of a symbol at a given text | ||
export declare namespace TypeDefinitionRequest { | ||
const type: RequestType<TextDocumentPositionParams, Location | Location[] | LocationLink[] | null, void, TextDocumentRegistrationOptions>; | ||
type HandlerSignature = RequestHandler<TextDocumentPositionParams, Definition | DefinitionLink[] | null, void>; | ||
const type: RequestType<TypeDefinitionParams, Location | Location[] | LocationLink[] | null, void, TypeDefinitionRegistrationOptions>; | ||
const resultType: ProgressType<Location[] | LocationLink[]>; | ||
type HandlerSignature = RequestHandler<TypeDefinitionParams, Definition | DefinitionLink[] | null, void>; | ||
} |
@@ -19,2 +19,3 @@ /* -------------------------------------------------------------------------------------------- | ||
TypeDefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/typeDefinition'); | ||
TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {})); |
@@ -0,0 +0,0 @@ import { RequestType0, RequestHandler0, NotificationType, NotificationHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc'; |
@@ -0,0 +0,0 @@ /* -------------------------------------------------------------------------------------------- |
@@ -10,1 +10,2 @@ export declare function boolean(value: any): value is boolean; | ||
export declare function thenable<T>(value: any): value is Thenable<T>; | ||
export declare function objectLiteral(value: any): value is object; |
@@ -43,1 +43,8 @@ /* -------------------------------------------------------------------------------------------- | ||
exports.thenable = thenable; | ||
function objectLiteral(value) { | ||
// Strictly speaking class instances pass this check as well. Since the LSP | ||
// doesn't use classes we ignore this for now. If we do we need to add something | ||
// like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` | ||
return value !== null && typeof value === 'object'; | ||
} | ||
exports.objectLiteral = objectLiteral; |
@@ -0,0 +0,0 @@ Copyright (c) Microsoft Corporation |
{ | ||
"name": "vscode-languageserver-protocol", | ||
"description": "VSCode Language Server Protocol implementation", | ||
"version": "3.15.0-next.6", | ||
"version": "3.15.0-next.7", | ||
"author": "Microsoft Corporation", | ||
@@ -18,4 +18,4 @@ "license": "MIT", | ||
"dependencies": { | ||
"vscode-jsonrpc": "^4.1.0-next.2", | ||
"vscode-languageserver-types": "^3.15.0-next.2" | ||
"vscode-jsonrpc": "^4.1.0-next.3", | ||
"vscode-languageserver-types": "^3.15.0-next.3" | ||
}, | ||
@@ -22,0 +22,0 @@ "scripts": { |
@@ -0,0 +0,0 @@ # VSCode Language Server - Protocol Module |
@@ -0,0 +0,0 @@ THIRD-PARTY SOFTWARE NOTICES AND INFORMATION |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
162406
3819