1 import { RequestHandler } from 'vscode-jsonrpc';
2 import { TextDocumentIdentifier, Range, Color, ColorInformation, ColorPresentation } from 'vscode-languageserver-types';
3 import { ProtocolRequestType } from './messages';
4 import { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
5 export interface DocumentColorClientCapabilities {
7 * Whether implementation supports dynamic registration. If this is set to `true`
8 * the client supports the new `DocumentColorRegistrationOptions` return value
9 * for the corresponding server capability as well.
11 dynamicRegistration?: boolean;
13 export interface DocumentColorOptions extends WorkDoneProgressOptions {
15 export interface DocumentColorRegistrationOptions extends TextDocumentRegistrationOptions, StaticRegistrationOptions, DocumentColorOptions {
18 * Parameters for a [DocumentColorRequest](#DocumentColorRequest).
20 export interface DocumentColorParams extends WorkDoneProgressParams, PartialResultParams {
24 textDocument: TextDocumentIdentifier;
27 * A request to list all color symbols found in a given text document. The request's
28 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
29 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
30 * that resolves to such.
32 export declare namespace DocumentColorRequest {
33 const method: 'textDocument/documentColor';
34 const type: ProtocolRequestType<DocumentColorParams, ColorInformation[], ColorInformation[], void, DocumentColorRegistrationOptions>;
35 type HandlerSignature = RequestHandler<DocumentColorParams, ColorInformation[], void>;
38 * Parameters for a [ColorPresentationRequest](#ColorPresentationRequest).
40 export interface ColorPresentationParams extends WorkDoneProgressParams, PartialResultParams {
44 textDocument: TextDocumentIdentifier;
46 * The color to request presentations for.
50 * The range where the color would be inserted. Serves as a context.
55 * A request to list all presentation for a color. The request's
56 * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
57 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
58 * that resolves to such.
60 export declare namespace ColorPresentationRequest {
61 const type: ProtocolRequestType<ColorPresentationParams, ColorPresentation[], ColorPresentation[], void, WorkDoneProgressOptions & TextDocumentRegistrationOptions>;
62 type HandlerSignature = RequestHandler<ColorPresentationParams, ColorPresentation[], void>;