vscode-languageserver-protocol 3.15.0-next.8 → 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.
@@ -1,37 +1,25 @@
1
- import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc';
1
+ import { RequestHandler, ProgressType } from 'vscode-jsonrpc';
2
2
  import { Declaration, DeclarationLink, Location, LocationLink } from 'vscode-languageserver-types';
3
+ import { ProtocolRequestType } from './messages';
3
4
  import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
5
+ /**
6
+ * Since 3.14.0
7
+ */
4
8
  export interface DeclarationClientCapabilities {
5
9
  /**
6
- * The text document client capabilities
10
+ * Whether declaration supports dynamic registration. If this is set to `true`
11
+ * the client supports the new `DeclarationRegistrationOptions` return value
12
+ * for the corresponding server capability as well.
13
+ */
14
+ dynamicRegistration?: boolean;
15
+ /**
16
+ * The client supports additional metadata in the form of declaration links.
7
17
  */
8
- textDocument?: {
9
- /**
10
- * Capabilities specific to the `textDocument/declaration`
11
- */
12
- declaration?: {
13
- /**
14
- * Whether declaration supports dynamic registration. If this is set to `true`
15
- * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
16
- * return value for the corresponding server capability as well.
17
- */
18
- dynamicRegistration?: boolean;
19
- /**
20
- * The client supports additional metadata in the form of declaration links.
21
- */
22
- linkSupport?: boolean;
23
- };
24
- };
18
+ linkSupport?: boolean;
25
19
  }
26
20
  export interface DeclarationOptions extends WorkDoneProgressOptions {
27
21
  }
28
- export interface DeclarationRegistrationOptions extends TextDocumentRegistrationOptions, DeclarationOptions {
29
- }
30
- export interface DeclarationServerCapabilities {
31
- /**
32
- * The server provides Goto Type Definition support.
33
- */
34
- declarationProvider?: boolean | DeclarationOptions | (DeclarationRegistrationOptions & StaticRegistrationOptions);
22
+ export interface DeclarationRegistrationOptions extends DeclarationOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
35
23
  }
36
24
  export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
37
25
  }
@@ -43,7 +31,9 @@ export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneP
43
31
  * to such.
44
32
  */
45
33
  export declare namespace DeclarationRequest {
46
- const type: RequestType<DeclarationParams, Location | Location[] | LocationLink[] | null, void, DeclarationRegistrationOptions>;
47
- const resultType: ProgressType<Location[] | LocationLink[]>;
34
+ const method: 'textDocument/declaration';
35
+ const type: ProtocolRequestType<DeclarationParams, Location | LocationLink[] | Location[] | null, LocationLink[] | Location[], void, DeclarationRegistrationOptions>;
36
+ /** @deprecated Use DeclarationRequest.type */
37
+ const resultType: ProgressType<LocationLink[] | Location[]>;
48
38
  type HandlerSignature = RequestHandler<DeclarationParams, Declaration | DeclarationLink[] | null, void>;
49
39
  }
@@ -5,6 +5,7 @@
5
5
  'use strict';
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const vscode_jsonrpc_1 = require("vscode-jsonrpc");
8
+ const messages_1 = require("./messages");
8
9
  // @ts-ignore: to avoid inlining LocatioLink as dynamic import
9
10
  let __noDynamicImport;
10
11
  /**
@@ -16,6 +17,8 @@ let __noDynamicImport;
16
17
  */
17
18
  var DeclarationRequest;
18
19
  (function (DeclarationRequest) {
19
- DeclarationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/declaration');
20
+ DeclarationRequest.method = 'textDocument/declaration';
21
+ DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
22
+ /** @deprecated Use DeclarationRequest.type */
20
23
  DeclarationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
21
24
  })(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
@@ -1,43 +1,28 @@
1
- import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc';
1
+ import { RequestHandler, ProgressType } from 'vscode-jsonrpc';
2
2
  import { TextDocumentIdentifier } from 'vscode-languageserver-types';
3
+ import { ProtocolRequestType } from './messages';
3
4
  import { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
4
5
  export interface FoldingRangeClientCapabilities {
5
6
  /**
6
- * The text document client capabilities
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.
7
10
  */
8
- textDocument?: {
9
- /**
10
- * Capabilities specific to `textDocument/foldingRange` requests
11
- */
12
- foldingRange?: {
13
- /**
14
- * Whether implementation supports dynamic registration for folding range providers. If this is set to `true`
15
- * the client supports the new `(FoldingRangeProviderOptions & TextDocumentRegistrationOptions & StaticRegistrationOptions)`
16
- * return value for the corresponding server capability as well.
17
- */
18
- dynamicRegistration?: boolean;
19
- /**
20
- * The maximum number of folding ranges that the client prefers to receive per document. The value serves as a
21
- * hint, servers are free to follow the limit.
22
- */
23
- rangeLimit?: number;
24
- /**
25
- * If set, the client signals that it only supports folding complete lines. If set, client will
26
- * ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.
27
- */
28
- lineFoldingOnly?: boolean;
29
- };
30
- };
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?: number;
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;
31
22
  }
32
23
  export interface FoldingRangeOptions extends WorkDoneProgressOptions {
33
24
  }
34
- export interface FoldingRangeRegistrationOptions extends TextDocumentRegistrationOptions, FoldingRangeOptions {
35
- }
36
- export interface FoldingRangeServerCapabilities {
37
- /**
38
- * The server provides folding provider support.
39
- */
40
- foldingRangeProvider?: boolean | FoldingRangeOptions | (FoldingRangeRegistrationOptions & StaticRegistrationOptions);
25
+ export interface FoldingRangeRegistrationOptions extends TextDocumentRegistrationOptions, FoldingRangeOptions, StaticRegistrationOptions {
41
26
  }
42
27
  /**
43
28
  * Enum of known range kinds
@@ -99,7 +84,9 @@ export interface FoldingRangeParams extends WorkDoneProgressParams, PartialResul
99
84
  * that resolves to such.
100
85
  */
101
86
  export declare namespace FoldingRangeRequest {
102
- const type: RequestType<FoldingRangeParams, FoldingRange[] | null, any, FoldingRangeRegistrationOptions>;
87
+ const method: 'textDocument/foldingRange';
88
+ const type: ProtocolRequestType<FoldingRangeParams, FoldingRange[] | null, FoldingRange[], any, FoldingRangeRegistrationOptions>;
89
+ /** @deprecated Use FoldingRangeRequest.type */
103
90
  const resultType: ProgressType<FoldingRange[]>;
104
91
  type HandlerSignature = RequestHandler<FoldingRangeParams, FoldingRange[] | null, void>;
105
92
  }
@@ -5,6 +5,7 @@
5
5
  *--------------------------------------------------------------------------------------------*/
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const vscode_jsonrpc_1 = require("vscode-jsonrpc");
8
+ const messages_1 = require("./messages");
8
9
  /**
9
10
  * Enum of known range kinds
10
11
  */
@@ -31,6 +32,8 @@ var FoldingRangeKind;
31
32
  */
32
33
  var FoldingRangeRequest;
33
34
  (function (FoldingRangeRequest) {
34
- FoldingRangeRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/foldingRange');
35
+ FoldingRangeRequest.method = 'textDocument/foldingRange';
36
+ FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
37
+ /** @deprecated Use FoldingRangeRequest.type */
35
38
  FoldingRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
36
39
  })(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
@@ -1,37 +1,27 @@
1
- import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc';
1
+ import { RequestHandler, ProgressType } from 'vscode-jsonrpc';
2
2
  import { Definition, DefinitionLink, Location, LocationLink } from 'vscode-languageserver-types';
3
+ import { ProtocolRequestType } from './messages';
3
4
  import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
5
+ /**
6
+ * Since 3.6.0
7
+ */
4
8
  export interface ImplementationClientCapabilities {
5
9
  /**
6
- * The text document client capabilities
10
+ * Whether implementation supports dynamic registration. If this is set to `true`
11
+ * the client supports the new `ImplementationRegistrationOptions` return value
12
+ * for the corresponding server capability as well.
13
+ */
14
+ dynamicRegistration?: boolean;
15
+ /**
16
+ * The client supports additional metadata in the form of definition links.
17
+ *
18
+ * Since 3.14.0
7
19
  */
8
- textDocument?: {
9
- /**
10
- * Capabilities specific to the `textDocument/implementation`
11
- */
12
- implementation?: {
13
- /**
14
- * Whether implementation supports dynamic registration. If this is set to `true`
15
- * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
16
- * return value for the corresponding server capability as well.
17
- */
18
- dynamicRegistration?: boolean;
19
- /**
20
- * The client supports additional metadata in the form of definition links.
21
- */
22
- linkSupport?: boolean;
23
- };
24
- };
20
+ linkSupport?: boolean;
25
21
  }
26
22
  export interface ImplementationOptions extends WorkDoneProgressOptions {
27
23
  }
28
- export interface ImplementationRegistrationOptions extends TextDocumentRegistrationOptions, ImplementationOptions {
29
- }
30
- export interface ImplementationServerCapabilities {
31
- /**
32
- * The server provides Goto Implementation support.
33
- */
34
- implementationProvider?: boolean | ImplementationOptions | (ImplementationRegistrationOptions & StaticRegistrationOptions);
24
+ export interface ImplementationRegistrationOptions extends TextDocumentRegistrationOptions, ImplementationOptions, StaticRegistrationOptions {
35
25
  }
36
26
  export interface ImplementationParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
37
27
  }
@@ -42,7 +32,9 @@ export interface ImplementationParams extends TextDocumentPositionParams, WorkDo
42
32
  * Thenable that resolves to such.
43
33
  */
44
34
  export declare namespace ImplementationRequest {
45
- const type: RequestType<ImplementationParams, Location | Location[] | LocationLink[] | null, void, ImplementationRegistrationOptions>;
46
- const resultType: ProgressType<Location[] | LocationLink[]>;
35
+ const method: 'textDocument/implementation';
36
+ const type: ProtocolRequestType<ImplementationParams, Location | Location[] | LocationLink[] | null, LocationLink[] | Location[], void, ImplementationRegistrationOptions>;
37
+ /** @deprecated Use ImplementationRequest.type */
38
+ const resultType: ProgressType<LocationLink[] | Location[]>;
47
39
  type HandlerSignature = RequestHandler<ImplementationParams, Definition | DefinitionLink[] | null, void>;
48
40
  }
@@ -5,6 +5,7 @@
5
5
  'use strict';
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const vscode_jsonrpc_1 = require("vscode-jsonrpc");
8
+ const messages_1 = require("./messages");
8
9
  // @ts-ignore: to avoid inlining LocatioLink as dynamic import
9
10
  let __noDynamicImport;
10
11
  /**
@@ -15,6 +16,8 @@ let __noDynamicImport;
15
16
  */
16
17
  var ImplementationRequest;
17
18
  (function (ImplementationRequest) {
18
- ImplementationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/implementation');
19
+ ImplementationRequest.method = 'textDocument/implementation';
20
+ ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
21
+ /** @deprecated Use ImplementationRequest.type */
19
22
  ImplementationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
20
23
  })(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));