1 import { HandlerResult, RequestHandler } from 'vscode-jsonrpc';
2 import { Range, URI } from 'vscode-languageserver-types';
3 import { ProtocolRequestType } from './messages';
5 * Client capabilities for the show document request.
9 export interface ShowDocumentClientCapabilities {
11 * The client has support for the show document
17 * Params to show a document.
21 export interface ShowDocumentParams {
23 * The document uri to show.
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`.
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
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
48 * The result of an show document request.
52 export interface ShowDocumentResult {
54 * A boolean indicating if the show was successful.
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.
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>;