How to use the vscode-jsonrpc.ProgressType function in vscode-jsonrpc

To help you get started, we’ve selected a few vscode-jsonrpc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / vscode-languageserver-node / protocol / src / protocol.typeDefinition.ts View on Github external
export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions, StaticRegistrationOptions {
}

export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
}

/**
 * A request to resolve the type definition locations of a symbol at a given text
 * document position. The request's parameter is of type [TextDocumentPositioParams]
 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
 * Thenable that resolves to such.
 */
export namespace TypeDefinitionRequest {
	export const method: 'textDocument/typeDefinition' = 'textDocument/typeDefinition';
	export const type = new RequestType(method);
	export const resultType = new ProgressType();
	export type HandlerSignature = RequestHandler;
}
github microsoft / vscode-languageserver-node / protocol / src / protocol.progress.proposed.ts View on Github external
percentage?: number;
}

export interface WorkDoneProgressDone {

	kind: 'done';

	/**
	 * Optional, a final message indicating to for example indicate the outcome
	 * of the operation.
	 */
	message?: string;
}

export namespace WorkDoneProgress {
	export const type = new ProgressType();
}

export interface WorkDoneProgressCreateParams  {
	/**
	 * The token to be used to report progress.
	 */
	token: ProgressToken;
}

/**
 * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
 * reporting from the server.
 */
export namespace WorkDoneProgressCreateRequest {
	export const type = new RequestType('window/workDoneProgress/create');
	export type HandlerSignature = RequestHandler;
github microsoft / vscode-languageserver-node / protocol / src / protocol.selectionRange.ts View on Github external
/**
	 * The positions inside the text document.
	 */
	positions: Position[];
}

/**
 * A request to provide selection ranges in a document. The request's
 * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
 * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
 * that resolves to such.
 */
export namespace SelectionRangeRequest {
	export const method: 'textDocument/selectionRange' = 'textDocument/selectionRange';
	export const type: RequestType = new RequestType(method);
	export const resultType = new ProgressType();
	export type HandlerSignature = RequestHandler;
}
github microsoft / vscode-languageserver-node / protocol / src / protocol.callHierarchy.proposed.ts View on Github external
}

export namespace CallHierarchyPrepareRequest {
	export const method: 'textDocument/prepareCallHierarchy' = 'textDocument/prepareCallHierarchy';
	export const type = new RequestType(method);
	export type HandlerSignature = RequestHandler;
}

export interface CallHierarchyIncomingCallsParams extends WorkDoneProgressParams, PartialResultParams {
	item: CallHierarchyItem;
}

export namespace CallHierarchyIncomingCallsRequest {
	export const method: 'callHierarchy/incomingCalls' = 'callHierarchy/incomingCalls';
	export const type = new RequestType(method);
	export const resultType = new ProgressType();
	export type HandlerSignature = RequestHandler;
}

export interface CallHierarchyOutgoingCallsParams extends WorkDoneProgressParams, PartialResultParams {
	item: CallHierarchyItem;
}

export namespace CallHierarchyOutgoingCallsRequest {
	export const method: 'callHierarchy/outgoingCalls' = 'callHierarchy/outgoingCalls';
	export const type = new RequestType(method);
	export const resultType = new ProgressType();
	export type HandlerSignature = RequestHandler;
}
github microsoft / vscode-languageserver-node / protocol / src / protocol.declaration.ts View on Github external
}

export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
}

/**
 * A request to resolve the type definition locations of a symbol at a given text
 * document position. The request's parameter is of type [TextDocumentPositioParams]
 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
 * to such.
 */
export namespace DeclarationRequest {
	export const method: 'textDocument/declaration' = 'textDocument/declaration';
	export const type = new RequestType(method);
	export const resultType = new ProgressType();
	export type HandlerSignature = RequestHandler;
}
github microsoft / vscode-languageserver-node / protocol / src / protocol.foldingRange.ts View on Github external
/**
	 * The text document.
	 */
	textDocument: TextDocumentIdentifier;
}

/**
 * A request to provide folding ranges in a document. The request's
 * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
 * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
 * that resolves to such.
 */
export namespace FoldingRangeRequest {
	export const method: 'textDocument/foldingRange' = 'textDocument/foldingRange';
	export const type: RequestType = new RequestType(method);
	export const resultType = new ProgressType();
	export type HandlerSignature = RequestHandler;
}
github microsoft / vscode-languageserver-node / protocol / src / protocol.ts View on Github external
* Registration options for a [DefinitionRequest](#DefinitionRequest).
 */
export interface DefinitionRegistrationOptions extends TextDocumentRegistrationOptions, DefinitionOptions {
}

/**
 * A request to resolve the definition location of a symbol at a given text
 * document position. The request's parameter is of type [TextDocumentPosition]
 * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
 * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
 * to such.
 */
export namespace DefinitionRequest {
	export const method: 'textDocument/definition' = 'textDocument/definition';
	export const type = new RequestType(method);
	export const resultType = new ProgressType();
}

//---- Reference Provider ----------------------------------

/**
 * Client Capabilities for a [ReferencesRequest](#ReferencesRequest).
 */
export interface ReferenceClientCapabilities {
	/**
	 * Whether references supports dynamic registration.
	 */
	dynamicRegistration?: boolean;
}

/**
 * Parameters for a [ReferencesRequest](#ReferencesRequest).
github microsoft / vscode-languageserver-node / protocol / src / protocol.colorProvider.ts View on Github external
/**
	 * The text document.
	 */
	textDocument: TextDocumentIdentifier;
}

/**
 * A request to list all color symbols found in a given text document. The request's
 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
 * that resolves to such.
 */
export namespace DocumentColorRequest {
	export const method: 'textDocument/documentColor' = 'textDocument/documentColor';
	export const type = new RequestType(method);
	export const resultType = new ProgressType();
	export type HandlerSignature = RequestHandler;
}

/**
 * Parameters for a [ColorPresentationRequest](#ColorPresentationRequest).
 */
export interface ColorPresentationParams extends WorkDoneProgressParams, PartialResultParams {
	/**
	 * The text document.
	 */
	textDocument: TextDocumentIdentifier;

	/**
	 * The color to request presentations for.
	 */
	color: Color
github microsoft / vscode-languageserver-node / protocol / src / protocol.implementation.ts View on Github external
export interface ImplementationRegistrationOptions extends TextDocumentRegistrationOptions, ImplementationOptions, StaticRegistrationOptions {
}

export interface ImplementationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
}

/**
 * A request to resolve the implementation locations of a symbol at a given text
 * document position. The request's parameter is of type [TextDocumentPositioParams]
 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
 * Thenable that resolves to such.
 */
export namespace ImplementationRequest {
	export const method: 'textDocument/implementation' = 'textDocument/implementation';
	export const type = new RequestType(method);
	export const resultType = new ProgressType();
	export type HandlerSignature = RequestHandler;
}