massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-json / node_modules / vscode-languageserver-protocol / lib / common / protocol.foldingRange.d.ts
1 import { RequestHandler } from 'vscode-jsonrpc';
2 import { TextDocumentIdentifier, uinteger, FoldingRange } from 'vscode-languageserver-types';
3 import { ProtocolRequestType } from './messages';
4 import { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
5 export interface FoldingRangeClientCapabilities {
6     /**
7      * Whether implementation supports dynamic registration for folding range providers. If this is set to `true`
8      * the client supports the new `FoldingRangeRegistrationOptions` return value for the corresponding server
9      * capability as well.
10      */
11     dynamicRegistration?: boolean;
12     /**
13      * The maximum number of folding ranges that the client prefers to receive per document. The value serves as a
14      * hint, servers are free to follow the limit.
15      */
16     rangeLimit?: uinteger;
17     /**
18      * If set, the client signals that it only supports folding complete lines. If set, client will
19      * ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.
20      */
21     lineFoldingOnly?: boolean;
22 }
23 export interface FoldingRangeOptions extends WorkDoneProgressOptions {
24 }
25 export interface FoldingRangeRegistrationOptions extends TextDocumentRegistrationOptions, FoldingRangeOptions, StaticRegistrationOptions {
26 }
27 /**
28  * Enum of known range kinds
29  */
30 export declare enum FoldingRangeKind {
31     /**
32      * Folding range for a comment
33      */
34     Comment = "comment",
35     /**
36      * Folding range for a imports or includes
37      */
38     Imports = "imports",
39     /**
40      * Folding range for a region (e.g. `#region`)
41      */
42     Region = "region"
43 }
44 /**
45  * Parameters for a [FoldingRangeRequest](#FoldingRangeRequest).
46  */
47 export interface FoldingRangeParams extends WorkDoneProgressParams, PartialResultParams {
48     /**
49      * The text document.
50      */
51     textDocument: TextDocumentIdentifier;
52 }
53 /**
54  * A request to provide folding ranges in a document. The request's
55  * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
56  * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
57  * that resolves to such.
58  */
59 export declare namespace FoldingRangeRequest {
60     const method: 'textDocument/foldingRange';
61     const type: ProtocolRequestType<FoldingRangeParams, FoldingRange[] | null, FoldingRange[], any, FoldingRangeRegistrationOptions>;
62     type HandlerSignature = RequestHandler<FoldingRangeParams, FoldingRange[] | null, void>;
63 }