massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-json / node_modules / vscode-languageserver-protocol / lib / common / protocol.showDocument.d.ts
1 import { HandlerResult, RequestHandler } from 'vscode-jsonrpc';
2 import { Range, URI } from 'vscode-languageserver-types';
3 import { ProtocolRequestType } from './messages';
4 /**
5  * Client capabilities for the show document request.
6  *
7  * @since 3.16.0
8  */
9 export interface ShowDocumentClientCapabilities {
10     /**
11      * The client has support for the show document
12      * request.
13      */
14     support: boolean;
15 }
16 /**
17  * Params to show a document.
18  *
19  * @since 3.16.0
20  */
21 export interface ShowDocumentParams {
22     /**
23      * The document uri to show.
24      */
25     uri: URI;
26     /**
27      * Indicates to show the resource in an external program.
28      * To show for example `https://code.visualstudio.com/`
29      * in the default WEB browser set `external` to `true`.
30      */
31     external?: boolean;
32     /**
33      * An optional property to indicate whether the editor
34      * showing the document should take focus or not.
35      * Clients might ignore this property if an external
36      * program in started.
37      */
38     takeFocus?: boolean;
39     /**
40      * An optional selection range if the document is a text
41      * document. Clients might ignore the property if an
42      * external program is started or the file is not a text
43      * file.
44      */
45     selection?: Range;
46 }
47 /**
48  * The result of an show document request.
49  *
50  * @since 3.16.0
51  */
52 export interface ShowDocumentResult {
53     /**
54      * A boolean indicating if the show was successful.
55      */
56     success: boolean;
57 }
58 /**
59  * A request to show a document. This request might open an
60  * external program depending on the value of the URI to open.
61  * For example a request to open `https://code.visualstudio.com/`
62  * will very likely open the URI in a WEB browser.
63  *
64  * @since 3.16.0
65 */
66 export declare namespace ShowDocumentRequest {
67     const method: 'window/showDocument';
68     const type: ProtocolRequestType<ShowDocumentParams, ShowDocumentResult, void, void, void>;
69     type HandlerSignature = RequestHandler<ShowDocumentParams, ShowDocumentResult, void>;
70     type MiddlewareSignature = (params: ShowDocumentParams, next: HandlerSignature) => HandlerResult<ShowDocumentResult, void>;
71 }