1 | import { RequestHandler, RequestHandler0 } from 'vscode-jsonrpc';
|
2 | import { Range, TextDocumentIdentifier, InlayHint } from 'vscode-languageserver-types';
|
3 | import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './messages';
|
4 | import type { StaticRegistrationOptions, TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams } from './protocol';
|
5 | /**
|
6 | * Inlay hint client capabilities.
|
7 | *
|
8 | * @since 3.17.0
|
9 | */
|
10 | export type InlayHintClientCapabilities = {
|
11 | /**
|
12 | * Whether inlay hints support dynamic registration.
|
13 | */
|
14 | dynamicRegistration?: boolean;
|
15 | /**
|
16 | * Indicates which properties a client can resolve lazily on an inlay
|
17 | * hint.
|
18 | */
|
19 | resolveSupport?: {
|
20 | /**
|
21 | * The properties that a client can resolve lazily.
|
22 | */
|
23 | properties: string[];
|
24 | };
|
25 | };
|
26 | /**
|
27 | * Client workspace capabilities specific to inlay hints.
|
28 | *
|
29 | * @since 3.17.0
|
30 | */
|
31 | export type InlayHintWorkspaceClientCapabilities = {
|
32 | /**
|
33 | * Whether the client implementation supports a refresh request sent from
|
34 | * the server to the client.
|
35 | *
|
36 | * Note that this event is global and will force the client to refresh all
|
37 | * inlay hints currently shown. It should be used with absolute care and
|
38 | * is useful for situation where a server for example detects a project wide
|
39 | * change that requires such a calculation.
|
40 | */
|
41 | refreshSupport?: boolean;
|
42 | };
|
43 | /**
|
44 | * Inlay hint options used during static registration.
|
45 | *
|
46 | * @since 3.17.0
|
47 | */
|
48 | export type InlayHintOptions = WorkDoneProgressOptions & {
|
49 | /**
|
50 | * The server provides support to resolve additional
|
51 | * information for an inlay hint item.
|
52 | */
|
53 | resolveProvider?: boolean;
|
54 | };
|
55 | /**
|
56 | * Inlay hint options used during static or dynamic registration.
|
57 | *
|
58 | * @since 3.17.0
|
59 | */
|
60 | export type InlayHintRegistrationOptions = InlayHintOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions;
|
61 | /**
|
62 | * A parameter literal used in inlay hint requests.
|
63 | *
|
64 | * @since 3.17.0
|
65 | */
|
66 | export type InlayHintParams = WorkDoneProgressParams & {
|
67 | /**
|
68 | * The text document.
|
69 | */
|
70 | textDocument: TextDocumentIdentifier;
|
71 | /**
|
72 | * The document range for which inlay hints should be computed.
|
73 | */
|
74 | range: Range;
|
75 | };
|
76 | /**
|
77 | * A request to provide inlay hints in a document. The request's parameter is of
|
78 | * type {@link InlayHintsParams}, the response is of type
|
79 | * {@link InlayHint InlayHint[]} or a Thenable that resolves to such.
|
80 | *
|
81 | * @since 3.17.0
|
82 | */
|
83 | export declare namespace InlayHintRequest {
|
84 | const method: 'textDocument/inlayHint';
|
85 | const messageDirection: MessageDirection;
|
86 | const type: ProtocolRequestType<InlayHintParams, InlayHint[] | null, InlayHint[], void, InlayHintRegistrationOptions>;
|
87 | type HandlerSignature = RequestHandler<InlayHintParams, InlayHint[] | null, void>;
|
88 | }
|
89 | /**
|
90 | * A request to resolve additional properties for an inlay hint.
|
91 | * The request's parameter is of type {@link InlayHint}, the response is
|
92 | * of type {@link InlayHint} or a Thenable that resolves to such.
|
93 | *
|
94 | * @since 3.17.0
|
95 | */
|
96 | export declare namespace InlayHintResolveRequest {
|
97 | const method: 'inlayHint/resolve';
|
98 | const messageDirection: MessageDirection;
|
99 | const type: ProtocolRequestType<InlayHint, InlayHint, never, void, void>;
|
100 | type HandlerSignature = RequestHandler<InlayHint, InlayHint, void>;
|
101 | }
|
102 | /**
|
103 | * @since 3.17.0
|
104 | */
|
105 | export declare namespace InlayHintRefreshRequest {
|
106 | const method: `workspace/inlayHint/refresh`;
|
107 | const messageDirection: MessageDirection;
|
108 | const type: ProtocolRequestType0<void, void, void, void>;
|
109 | type HandlerSignature = RequestHandler0<void, void>;
|
110 | }
|