vscode-languageserver-protocol 3.15.1 → 3.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/main.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from 'vscode-languageserver-types';
4
4
  export * from './protocol';
5
5
  export { FoldingRangeParams as FoldingRangeRequestParam } from './protocol';
6
6
  import * as callHierarchy from './protocol.callHierarchy.proposed';
7
+ import * as st from './protocol.sematicTokens.proposed';
7
8
  export declare namespace Proposed {
8
9
  type CallHierarchyClientCapabilities = callHierarchy.CallHierarchyClientCapabilities;
9
10
  type CallHierarchyItem = callHierarchy.CallHierarchyItem;
@@ -21,17 +22,43 @@ export declare namespace Proposed {
21
22
  type CallHierarchyIncomingCallsParams = callHierarchy.CallHierarchyIncomingCallsParams;
22
23
  namespace CallHierarchyIncomingCallsRequest {
23
24
  const method: "callHierarchy/incomingCalls";
24
- const type: typeof callHierarchy.CallHierarchyIncomingCallsRequest;
25
- const resultType: ProgressType<callHierarchy.CallHierarchyIncomingCall[]>;
25
+ const type: import("./messages").ProtocolRequestType<callHierarchy.CallHierarchyIncomingCallsParams, callHierarchy.CallHierarchyIncomingCall[] | null, callHierarchy.CallHierarchyIncomingCall[], void, void>;
26
26
  type HandlerSignature = callHierarchy.CallHierarchyIncomingCallsRequest.HandlerSignature;
27
27
  }
28
28
  type CallHierarchyOutgoingCallsParams = callHierarchy.CallHierarchyOutgoingCallsParams;
29
29
  namespace CallHierarchyOutgoingCallsRequest {
30
30
  const method: "callHierarchy/outgoingCalls";
31
- const type: typeof callHierarchy.CallHierarchyOutgoingCallsRequest;
32
- const resultType: ProgressType<callHierarchy.CallHierarchyOutgoingCall[]>;
31
+ const type: import("./messages").ProtocolRequestType<callHierarchy.CallHierarchyOutgoingCallsParams, callHierarchy.CallHierarchyOutgoingCall[] | null, callHierarchy.CallHierarchyOutgoingCall[], void, void>;
33
32
  type HandlerSignature = callHierarchy.CallHierarchyOutgoingCallsRequest.HandlerSignature;
34
33
  }
34
+ const SemanticTokenTypes: typeof st.SemanticTokenTypes;
35
+ const SemanticTokenModifiers: typeof st.SemanticTokenModifiers;
36
+ type SemanticTokensLegend = st.SemanticTokensLegend;
37
+ type SemanticTokens = st.SemanticTokens;
38
+ const SemanticTokens: typeof st.SemanticTokens;
39
+ type SemanticTokensPartialResult = st.SemanticTokensPartialResult;
40
+ type SemanticTokensEdit = st.SemanticTokensEdit;
41
+ type SemanticTokensEdits = st.SemanticTokensEdits;
42
+ type SemanticTokensEditsPartialResult = st.SemanticTokensEditsPartialResult;
43
+ type SemanticTokensClientCapabilities = st.SemanticTokensClientCapabilities;
44
+ type SemanticTokensOptions = st.SemanticTokensOptions;
45
+ type SemanticTokensRegistrationOptions = st.SemanticTokensRegistrationOptions;
46
+ type SemanticTokensServerCapabilities = st.SemanticTokensServerCapabilities;
47
+ type SemanticTokensParams = st.SemanticTokensParams;
48
+ namespace SemanticTokensRequest {
49
+ const method: "textDocument/semanticTokens";
50
+ const type: import("./messages").ProtocolRequestType<st.SemanticTokensParams, st.SemanticTokens | null, st.SemanticTokensPartialResult, void, st.SemanticTokensRegistrationOptions>;
51
+ }
52
+ type SemanticTokensEditsParams = st.SemanticTokensEditsParams;
53
+ namespace SemanticTokensEditsRequest {
54
+ const method: "textDocument/semanticTokens/edits";
55
+ const type: import("./messages").ProtocolRequestType<st.SemanticTokensEditsParams, st.SemanticTokens | st.SemanticTokensEdits | null, st.SemanticTokensPartialResult | st.SemanticTokensEditsPartialResult, void, st.SemanticTokensRegistrationOptions>;
56
+ }
57
+ type SemanticTokensRangeParams = st.SemanticTokensRangeParams;
58
+ namespace SemanticTokensRangeRequest {
59
+ const method: "textDocument/semanticTokens/range";
60
+ const type: import("./messages").ProtocolRequestType<st.SemanticTokensRangeParams, st.SemanticTokens | null, st.SemanticTokensPartialResult, void, void>;
61
+ }
35
62
  }
36
63
  export interface ProtocolConnection {
37
64
  /**
package/lib/main.js CHANGED
@@ -39,6 +39,7 @@ exports.ProgressType = vscode_jsonrpc_1.ProgressType;
39
39
  __export(require("vscode-languageserver-types"));
40
40
  __export(require("./protocol"));
41
41
  const callHierarchy = require("./protocol.callHierarchy.proposed");
42
+ const st = require("./protocol.sematicTokens.proposed");
42
43
  var Proposed;
43
44
  (function (Proposed) {
44
45
  let CallHierarchyPrepareRequest;
@@ -49,15 +50,31 @@ var Proposed;
49
50
  let CallHierarchyIncomingCallsRequest;
50
51
  (function (CallHierarchyIncomingCallsRequest) {
51
52
  CallHierarchyIncomingCallsRequest.method = callHierarchy.CallHierarchyIncomingCallsRequest.method;
52
- CallHierarchyIncomingCallsRequest.type = callHierarchy.CallHierarchyIncomingCallsRequest;
53
- CallHierarchyIncomingCallsRequest.resultType = callHierarchy.CallHierarchyIncomingCallsRequest.resultType;
53
+ CallHierarchyIncomingCallsRequest.type = callHierarchy.CallHierarchyIncomingCallsRequest.type;
54
54
  })(CallHierarchyIncomingCallsRequest = Proposed.CallHierarchyIncomingCallsRequest || (Proposed.CallHierarchyIncomingCallsRequest = {}));
55
55
  let CallHierarchyOutgoingCallsRequest;
56
56
  (function (CallHierarchyOutgoingCallsRequest) {
57
57
  CallHierarchyOutgoingCallsRequest.method = callHierarchy.CallHierarchyOutgoingCallsRequest.method;
58
- CallHierarchyOutgoingCallsRequest.type = callHierarchy.CallHierarchyOutgoingCallsRequest;
59
- CallHierarchyOutgoingCallsRequest.resultType = callHierarchy.CallHierarchyOutgoingCallsRequest.resultType;
58
+ CallHierarchyOutgoingCallsRequest.type = callHierarchy.CallHierarchyOutgoingCallsRequest.type;
60
59
  })(CallHierarchyOutgoingCallsRequest = Proposed.CallHierarchyOutgoingCallsRequest || (Proposed.CallHierarchyOutgoingCallsRequest = {}));
60
+ Proposed.SemanticTokenTypes = st.SemanticTokenTypes;
61
+ Proposed.SemanticTokenModifiers = st.SemanticTokenModifiers;
62
+ Proposed.SemanticTokens = st.SemanticTokens;
63
+ let SemanticTokensRequest;
64
+ (function (SemanticTokensRequest) {
65
+ SemanticTokensRequest.method = st.SemanticTokensRequest.method;
66
+ SemanticTokensRequest.type = st.SemanticTokensRequest.type;
67
+ })(SemanticTokensRequest = Proposed.SemanticTokensRequest || (Proposed.SemanticTokensRequest = {}));
68
+ let SemanticTokensEditsRequest;
69
+ (function (SemanticTokensEditsRequest) {
70
+ SemanticTokensEditsRequest.method = st.SemanticTokensEditsRequest.method;
71
+ SemanticTokensEditsRequest.type = st.SemanticTokensEditsRequest.type;
72
+ })(SemanticTokensEditsRequest = Proposed.SemanticTokensEditsRequest || (Proposed.SemanticTokensEditsRequest = {}));
73
+ let SemanticTokensRangeRequest;
74
+ (function (SemanticTokensRangeRequest) {
75
+ SemanticTokensRangeRequest.method = st.SemanticTokensRangeRequest.method;
76
+ SemanticTokensRangeRequest.type = st.SemanticTokensRangeRequest.type;
77
+ })(SemanticTokensRangeRequest = Proposed.SemanticTokensRangeRequest || (Proposed.SemanticTokensRangeRequest = {}));
61
78
  })(Proposed = exports.Proposed || (exports.Proposed = {}));
62
79
  function createProtocolConnection(reader, writer, logger, strategy) {
63
80
  return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
@@ -1,7 +1,13 @@
1
- import { RequestHandler, ProgressType } from 'vscode-jsonrpc';
1
+ import { RequestHandler } from 'vscode-jsonrpc';
2
2
  import { SymbolKind, SymbolTag, Range, DocumentUri } from 'vscode-languageserver-types';
3
3
  import { ProtocolRequestType } from './messages';
4
4
  import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
5
+ /**
6
+ * Represents programming constructs like functions or constructors in the context
7
+ * of call hierarchy.
8
+ *
9
+ * @since 3.16.0 - Proposed state
10
+ */
5
11
  export interface CallHierarchyItem {
6
12
  /**
7
13
  * The name of this item.
@@ -35,6 +41,8 @@ export interface CallHierarchyItem {
35
41
  }
36
42
  /**
37
43
  * Represents an incoming call, e.g. a caller of a method or constructor.
44
+ *
45
+ * @since 3.16.0 - Proposed state
38
46
  */
39
47
  export interface CallHierarchyIncomingCall {
40
48
  /**
@@ -49,6 +57,8 @@ export interface CallHierarchyIncomingCall {
49
57
  }
50
58
  /**
51
59
  * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
60
+ *
61
+ * @since 3.16.0 - Proposed state
52
62
  */
53
63
  export interface CallHierarchyOutgoingCall {
54
64
  /**
@@ -62,13 +72,18 @@ export interface CallHierarchyOutgoingCall {
62
72
  */
63
73
  fromRanges: Range[];
64
74
  }
75
+ /**
76
+ * @since 3.16.0 - Proposed state
77
+ */
65
78
  export interface CallHierarchyClientCapabilities {
66
79
  /**
67
80
  * The text document client capabilities
68
81
  */
69
82
  textDocument?: {
70
83
  /**
71
- * Capabilities specific to the `textDocument/callHierarchy`
84
+ * Capabilities specific to the `textDocument/callHierarchy`.
85
+ *
86
+ * @since 3.16.0 - Proposed state
72
87
  */
73
88
  callHierarchy?: {
74
89
  /**
@@ -80,10 +95,25 @@ export interface CallHierarchyClientCapabilities {
80
95
  };
81
96
  };
82
97
  }
98
+ /**
99
+ * Call hierarchy options used during static registration.
100
+ *
101
+ * @since 3.16.0 - Proposed state
102
+ */
83
103
  export interface CallHierarchyOptions extends WorkDoneProgressOptions {
84
104
  }
105
+ /**
106
+ * Call hierarchy options used during static or dynamic registration.
107
+ *
108
+ * @since 3.16.0 - Proposed state
109
+ */
85
110
  export interface CallHierarchyRegistrationOptions extends TextDocumentRegistrationOptions, CallHierarchyOptions {
86
111
  }
112
+ /**
113
+ * The call hierarchy server capabilities.
114
+ *
115
+ * @since 3.16.0 - Proposed state
116
+ */
87
117
  export interface CallHierarchyServerCapabilities {
88
118
  /**
89
119
  * The server provides Call Hierarchy support.
@@ -92,31 +122,55 @@ export interface CallHierarchyServerCapabilities {
92
122
  }
93
123
  /**
94
124
  * The parameter of a `textDocument/prepareCallHierarchy` request.
125
+ *
126
+ * @since 3.16.0 - Proposed state
95
127
  */
96
128
  export interface CallHierarchyPrepareParams extends TextDocumentPositionParams, WorkDoneProgressParams {
97
129
  }
130
+ /**
131
+ * A request to result a `CallHierarchyItem` in a document at a given position.
132
+ * Can be used as an input to a incoming or outgoing call hierarchy.
133
+ *
134
+ * @since 3.16.0 - Proposed state
135
+ */
98
136
  export declare namespace CallHierarchyPrepareRequest {
99
137
  const method: 'textDocument/prepareCallHierarchy';
100
138
  const type: ProtocolRequestType<CallHierarchyPrepareParams, CallHierarchyItem[] | null, never, void, CallHierarchyRegistrationOptions>;
101
139
  type HandlerSignature = RequestHandler<CallHierarchyPrepareParams, CallHierarchyItem[] | null, void>;
102
140
  }
141
+ /**
142
+ * The parameter of a `callHierarchy/incomingCalls` request.
143
+ *
144
+ * @since 3.16.0 - Proposed state
145
+ */
103
146
  export interface CallHierarchyIncomingCallsParams extends WorkDoneProgressParams, PartialResultParams {
104
147
  item: CallHierarchyItem;
105
148
  }
149
+ /**
150
+ * A request to resolve the incoming calls for a given `CallHierarchyItem`.
151
+ *
152
+ * @since 3.16.0 - Proposed state
153
+ */
106
154
  export declare namespace CallHierarchyIncomingCallsRequest {
107
155
  const method: 'callHierarchy/incomingCalls';
108
156
  const type: ProtocolRequestType<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, CallHierarchyIncomingCall[], void, void>;
109
- /** @deprecated Use CallHierarchyIncomingCallsRequest.type */
110
- const resultType: ProgressType<CallHierarchyIncomingCall[]>;
111
157
  type HandlerSignature = RequestHandler<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, void>;
112
158
  }
159
+ /**
160
+ * The parameter of a `callHierarchy/outgoingCalls` request.
161
+ *
162
+ * @since 3.16.0 - Proposed state
163
+ */
113
164
  export interface CallHierarchyOutgoingCallsParams extends WorkDoneProgressParams, PartialResultParams {
114
165
  item: CallHierarchyItem;
115
166
  }
167
+ /**
168
+ * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
169
+ *
170
+ * @since 3.16.0 - Proposed state
171
+ */
116
172
  export declare namespace CallHierarchyOutgoingCallsRequest {
117
173
  const method: 'callHierarchy/outgoingCalls';
118
174
  const type: ProtocolRequestType<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, CallHierarchyOutgoingCall[], void, void>;
119
- /** @deprecated Use CallHierarchyOutgoingCallsRequest.type */
120
- const resultType: ProgressType<CallHierarchyOutgoingCall[]>;
121
175
  type HandlerSignature = RequestHandler<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, void>;
122
176
  }
@@ -4,24 +4,35 @@
4
4
  * ------------------------------------------------------------------------------------------ */
5
5
  'use strict';
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- const vscode_jsonrpc_1 = require("vscode-jsonrpc");
8
7
  const messages_1 = require("./messages");
8
+ /**
9
+ * A request to result a `CallHierarchyItem` in a document at a given position.
10
+ * Can be used as an input to a incoming or outgoing call hierarchy.
11
+ *
12
+ * @since 3.16.0 - Proposed state
13
+ */
9
14
  var CallHierarchyPrepareRequest;
10
15
  (function (CallHierarchyPrepareRequest) {
11
16
  CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
12
17
  CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
13
18
  })(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
19
+ /**
20
+ * A request to resolve the incoming calls for a given `CallHierarchyItem`.
21
+ *
22
+ * @since 3.16.0 - Proposed state
23
+ */
14
24
  var CallHierarchyIncomingCallsRequest;
15
25
  (function (CallHierarchyIncomingCallsRequest) {
16
26
  CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
17
27
  CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
18
- /** @deprecated Use CallHierarchyIncomingCallsRequest.type */
19
- CallHierarchyIncomingCallsRequest.resultType = new vscode_jsonrpc_1.ProgressType();
20
28
  })(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
29
+ /**
30
+ * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
31
+ *
32
+ * @since 3.16.0 - Proposed state
33
+ */
21
34
  var CallHierarchyOutgoingCallsRequest;
22
35
  (function (CallHierarchyOutgoingCallsRequest) {
23
36
  CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
24
37
  CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
25
- /** @deprecated Use CallHierarchyOutgoingCallsRequest.type */
26
- CallHierarchyOutgoingCallsRequest.resultType = new vscode_jsonrpc_1.ProgressType();
27
38
  })(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
@@ -0,0 +1,240 @@
1
+ import { TextDocumentIdentifier, Range } from 'vscode-languageserver-types';
2
+ import { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol';
3
+ import { ProtocolRequestType } from './messages';
4
+ /**
5
+ * A set of predefined token types. This set is not fixed
6
+ * an clients can specify additional token types via the
7
+ * corresponding client capabilities.
8
+ *
9
+ * @since 3.16.0 - Proposed state
10
+ */
11
+ export declare enum SemanticTokenTypes {
12
+ comment = "comment",
13
+ keyword = "keyword",
14
+ string = "string",
15
+ number = "number",
16
+ regexp = "regexp",
17
+ operator = "operator",
18
+ namespace = "namespace",
19
+ type = "type",
20
+ struct = "struct",
21
+ class = "class",
22
+ interface = "interface",
23
+ enum = "enum",
24
+ typeParameter = "typeParameter",
25
+ function = "function",
26
+ member = "member",
27
+ property = "property",
28
+ marco = "marco",
29
+ variable = "variable",
30
+ parameter = "parameter",
31
+ label = "label"
32
+ }
33
+ /**
34
+ * A set of predefined token modifiers. This set is not fixed
35
+ * an clients can specify additional token types via the
36
+ * corresponding client capabilities.
37
+ *
38
+ * @since 3.16.0 - Proposed state
39
+ */
40
+ export declare enum SemanticTokenModifiers {
41
+ documentation = "documentation",
42
+ declaration = "declaration",
43
+ definition = "definition",
44
+ reference = "reference",
45
+ static = "static",
46
+ abstract = "abstract",
47
+ deprecated = "deprected",
48
+ async = "async",
49
+ volatile = "volatile",
50
+ final = "final"
51
+ }
52
+ /**
53
+ * @since 3.16.0 - Proposed state
54
+ */
55
+ export interface SemanticTokensLegend {
56
+ /**
57
+ * The token types a server uses.
58
+ */
59
+ tokenTypes: string[];
60
+ /**
61
+ * The token modifiers a server uses.
62
+ */
63
+ tokenModifiers: string[];
64
+ }
65
+ /**
66
+ * @since 3.16.0 - Proposed state
67
+ */
68
+ export interface SemanticTokens {
69
+ /**
70
+ * An optional result id. If provided and clients support delta updating
71
+ * the client will include the result id in the next semantic token request.
72
+ * A server can then instead of computing all sematic tokens again simply
73
+ * send a delta.
74
+ */
75
+ resultId?: string;
76
+ /**
77
+ * The actual tokens. For a detailed description about how the data is
78
+ * structured pls see
79
+ * https://github.com/microsoft/vscode-extension-samples/blob/5ae1f7787122812dcc84e37427ca90af5ee09f14/semantic-tokens-sample/vscode.proposed.d.ts#L71
80
+ */
81
+ data: number[];
82
+ }
83
+ /**
84
+ * @since 3.16.0 - Proposed state
85
+ */
86
+ export declare namespace SemanticTokens {
87
+ function is(value: any): value is SemanticTokens;
88
+ }
89
+ /**
90
+ * @since 3.16.0 - Proposed state
91
+ */
92
+ export interface SemanticTokensPartialResult {
93
+ data: number[];
94
+ }
95
+ /**
96
+ * @since 3.16.0 - Proposed state
97
+ */
98
+ export interface SemanticTokensEdit {
99
+ start: number;
100
+ deleteCount: number;
101
+ data?: number[];
102
+ }
103
+ /**
104
+ * @since 3.16.0 - Proposed state
105
+ */
106
+ export interface SemanticTokensEdits {
107
+ readonly resultId?: string;
108
+ /**
109
+ * For a detailed description how these edits are structured pls see
110
+ * https://github.com/microsoft/vscode-extension-samples/blob/5ae1f7787122812dcc84e37427ca90af5ee09f14/semantic-tokens-sample/vscode.proposed.d.ts#L131
111
+ */
112
+ edits: SemanticTokensEdit[];
113
+ }
114
+ /**
115
+ * @since 3.16.0 - Proposed state
116
+ */
117
+ export interface SemanticTokensEditsPartialResult {
118
+ edits: SemanticTokensEdit[];
119
+ }
120
+ /**
121
+ * @since 3.16.0 - Proposed state
122
+ */
123
+ export interface SemanticTokensClientCapabilities {
124
+ /**
125
+ * The text document client capabilities
126
+ */
127
+ textDocument?: {
128
+ /**
129
+ * Capabilities specific to the `textDocument/semanticTokens`
130
+ *
131
+ * @since 3.16.0 - Proposed state
132
+ */
133
+ semanticTokens?: {
134
+ /**
135
+ * Whether implementation supports dynamic registration. If this is set to `true`
136
+ * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
137
+ * return value for the corresponding server capability as well.
138
+ */
139
+ dynamicRegistration?: boolean;
140
+ /**
141
+ * The token types know by the client.
142
+ */
143
+ tokenTypes: string[];
144
+ /**
145
+ * The token modifiers know by the client.
146
+ */
147
+ tokenModifiers: string[];
148
+ };
149
+ };
150
+ }
151
+ /**
152
+ * @since 3.16.0 - Proposed state
153
+ */
154
+ export interface SemanticTokensOptions extends WorkDoneProgressOptions {
155
+ /**
156
+ * The legend used by the server
157
+ */
158
+ legend: SemanticTokensLegend;
159
+ /**
160
+ * Server supports providing semantic tokens for a sepcific range
161
+ * of a document.
162
+ */
163
+ rangeProvider?: boolean;
164
+ /**
165
+ * Server supports providing semantic tokens for a full document.
166
+ */
167
+ documentProvider?: boolean | {
168
+ /**
169
+ * The server supports deltas for full documents.
170
+ */
171
+ edits?: boolean;
172
+ };
173
+ }
174
+ /**
175
+ * @since 3.16.0 - Proposed state
176
+ */
177
+ export interface SemanticTokensRegistrationOptions extends TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions {
178
+ }
179
+ /**
180
+ * @since 3.16.0 - Proposed state
181
+ */
182
+ export interface SemanticTokensServerCapabilities {
183
+ semanticTokensProvider: SemanticTokensOptions | SemanticTokensRegistrationOptions;
184
+ }
185
+ /**
186
+ * @since 3.16.0 - Proposed state
187
+ */
188
+ export interface SemanticTokensParams extends WorkDoneProgressParams, PartialResultParams {
189
+ /**
190
+ * The text document.
191
+ */
192
+ textDocument: TextDocumentIdentifier;
193
+ }
194
+ /**
195
+ * @since 3.16.0 - Proposed state
196
+ */
197
+ export declare namespace SemanticTokensRequest {
198
+ const method: 'textDocument/semanticTokens';
199
+ const type: ProtocolRequestType<SemanticTokensParams, SemanticTokens | null, SemanticTokensPartialResult, void, SemanticTokensRegistrationOptions>;
200
+ }
201
+ /**
202
+ * @since 3.16.0 - Proposed state
203
+ */
204
+ export interface SemanticTokensEditsParams extends WorkDoneProgressParams, PartialResultParams {
205
+ /**
206
+ * The text document.
207
+ */
208
+ textDocument: TextDocumentIdentifier;
209
+ /**
210
+ * The previous result id.
211
+ */
212
+ previousResultId: string;
213
+ }
214
+ /**
215
+ * @since 3.16.0 - Proposed state
216
+ */
217
+ export declare namespace SemanticTokensEditsRequest {
218
+ const method: 'textDocument/semanticTokens/edits';
219
+ const type: ProtocolRequestType<SemanticTokensEditsParams, SemanticTokens | SemanticTokensEdits | null, SemanticTokensPartialResult | SemanticTokensEditsPartialResult, void, SemanticTokensRegistrationOptions>;
220
+ }
221
+ /**
222
+ * @since 3.16.0 - Proposed state
223
+ */
224
+ export interface SemanticTokensRangeParams extends WorkDoneProgressParams, PartialResultParams {
225
+ /**
226
+ * The text document.
227
+ */
228
+ textDocument: TextDocumentIdentifier;
229
+ /**
230
+ * The range the semantic tokens are requested for.
231
+ */
232
+ range: Range;
233
+ }
234
+ /**
235
+ * @since 3.16.0 - Proposed state
236
+ */
237
+ export declare namespace SemanticTokensRangeRequest {
238
+ const method: 'textDocument/semanticTokens/range';
239
+ const type: ProtocolRequestType<SemanticTokensRangeParams, SemanticTokens | null, SemanticTokensPartialResult, void, void>;
240
+ }
@@ -0,0 +1,93 @@
1
+ /* --------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ * ------------------------------------------------------------------------------------------ */
5
+ 'use strict';
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const messages_1 = require("./messages");
8
+ /**
9
+ * A set of predefined token types. This set is not fixed
10
+ * an clients can specify additional token types via the
11
+ * corresponding client capabilities.
12
+ *
13
+ * @since 3.16.0 - Proposed state
14
+ */
15
+ var SemanticTokenTypes;
16
+ (function (SemanticTokenTypes) {
17
+ SemanticTokenTypes["comment"] = "comment";
18
+ SemanticTokenTypes["keyword"] = "keyword";
19
+ SemanticTokenTypes["string"] = "string";
20
+ SemanticTokenTypes["number"] = "number";
21
+ SemanticTokenTypes["regexp"] = "regexp";
22
+ SemanticTokenTypes["operator"] = "operator";
23
+ SemanticTokenTypes["namespace"] = "namespace";
24
+ SemanticTokenTypes["type"] = "type";
25
+ SemanticTokenTypes["struct"] = "struct";
26
+ SemanticTokenTypes["class"] = "class";
27
+ SemanticTokenTypes["interface"] = "interface";
28
+ SemanticTokenTypes["enum"] = "enum";
29
+ SemanticTokenTypes["typeParameter"] = "typeParameter";
30
+ SemanticTokenTypes["function"] = "function";
31
+ SemanticTokenTypes["member"] = "member";
32
+ SemanticTokenTypes["property"] = "property";
33
+ SemanticTokenTypes["marco"] = "marco";
34
+ SemanticTokenTypes["variable"] = "variable";
35
+ SemanticTokenTypes["parameter"] = "parameter";
36
+ SemanticTokenTypes["label"] = "label";
37
+ })(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
38
+ /**
39
+ * A set of predefined token modifiers. This set is not fixed
40
+ * an clients can specify additional token types via the
41
+ * corresponding client capabilities.
42
+ *
43
+ * @since 3.16.0 - Proposed state
44
+ */
45
+ var SemanticTokenModifiers;
46
+ (function (SemanticTokenModifiers) {
47
+ SemanticTokenModifiers["documentation"] = "documentation";
48
+ SemanticTokenModifiers["declaration"] = "declaration";
49
+ SemanticTokenModifiers["definition"] = "definition";
50
+ SemanticTokenModifiers["reference"] = "reference";
51
+ SemanticTokenModifiers["static"] = "static";
52
+ SemanticTokenModifiers["abstract"] = "abstract";
53
+ SemanticTokenModifiers["deprecated"] = "deprected";
54
+ SemanticTokenModifiers["async"] = "async";
55
+ SemanticTokenModifiers["volatile"] = "volatile";
56
+ SemanticTokenModifiers["final"] = "final";
57
+ })(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
58
+ /**
59
+ * @since 3.16.0 - Proposed state
60
+ */
61
+ var SemanticTokens;
62
+ (function (SemanticTokens) {
63
+ function is(value) {
64
+ const candidate = value;
65
+ return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
66
+ Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
67
+ }
68
+ SemanticTokens.is = is;
69
+ })(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
70
+ /**
71
+ * @since 3.16.0 - Proposed state
72
+ */
73
+ var SemanticTokensRequest;
74
+ (function (SemanticTokensRequest) {
75
+ SemanticTokensRequest.method = 'textDocument/semanticTokens';
76
+ SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
77
+ })(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
78
+ /**
79
+ * @since 3.16.0 - Proposed state
80
+ */
81
+ var SemanticTokensEditsRequest;
82
+ (function (SemanticTokensEditsRequest) {
83
+ SemanticTokensEditsRequest.method = 'textDocument/semanticTokens/edits';
84
+ SemanticTokensEditsRequest.type = new messages_1.ProtocolRequestType(SemanticTokensEditsRequest.method);
85
+ })(SemanticTokensEditsRequest = exports.SemanticTokensEditsRequest || (exports.SemanticTokensEditsRequest = {}));
86
+ /**
87
+ * @since 3.16.0 - Proposed state
88
+ */
89
+ var SemanticTokensRangeRequest;
90
+ (function (SemanticTokensRangeRequest) {
91
+ SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
92
+ SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
93
+ })(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vscode-languageserver-protocol",
3
3
  "description": "VSCode Language Server Protocol implementation",
4
- "version": "3.15.1",
4
+ "version": "3.15.2",
5
5
  "author": "Microsoft Corporation",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -16,7 +16,7 @@
16
16
  "typings": "./lib/main",
17
17
  "dependencies": {
18
18
  "vscode-jsonrpc": "^5.0.1",
19
- "vscode-languageserver-types": "3.15.0"
19
+ "vscode-languageserver-types": "3.15.1"
20
20
  },
21
21
  "scripts": {
22
22
  "prepublishOnly": "npm run clean && npm run compile && npm test",