vscode-languageserver-protocol 3.17.0-next.9
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/License.txt +11 -0
- package/README.md +16 -0
- package/browser.d.ts +6 -0
- package/browser.js +7 -0
- package/lib/browser/main.d.ts +4 -0
- package/lib/browser/main.js +25 -0
- package/lib/common/api.d.ts +94 -0
- package/lib/common/api.js +87 -0
- package/lib/common/connection.d.ts +163 -0
- package/lib/common/connection.js +16 -0
- package/lib/common/messages.d.ts +44 -0
- package/lib/common/messages.js +39 -0
- package/lib/common/proposed.diagnostic.d.ts +324 -0
- package/lib/common/proposed.diagnostic.js +72 -0
- package/lib/common/proposed.typeHierarchy.d.ts +83 -0
- package/lib/common/proposed.typeHierarchy.js +40 -0
- package/lib/common/protocol.callHierarchy.d.ts +83 -0
- package/lib/common/protocol.callHierarchy.js +40 -0
- package/lib/common/protocol.colorProvider.d.ts +63 -0
- package/lib/common/protocol.colorProvider.js +30 -0
- package/lib/common/protocol.configuration.d.ts +46 -0
- package/lib/common/protocol.configuration.js +22 -0
- package/lib/common/protocol.d.ts +2750 -0
- package/lib/common/protocol.declaration.d.ts +37 -0
- package/lib/common/protocol.declaration.js +23 -0
- package/lib/common/protocol.fileOperations.d.ts +293 -0
- package/lib/common/protocol.fileOperations.js +92 -0
- package/lib/common/protocol.foldingRange.d.ts +63 -0
- package/lib/common/protocol.foldingRange.js +38 -0
- package/lib/common/protocol.implementation.d.ts +38 -0
- package/lib/common/protocol.implementation.js +22 -0
- package/lib/common/protocol.js +752 -0
- package/lib/common/protocol.linkedEditingRange.d.ts +51 -0
- package/lib/common/protocol.linkedEditingRange.js +19 -0
- package/lib/common/protocol.moniker.d.ts +103 -0
- package/lib/common/protocol.moniker.js +68 -0
- package/lib/common/protocol.progress.d.ts +117 -0
- package/lib/common/protocol.progress.js +34 -0
- package/lib/common/protocol.selectionRange.d.ts +40 -0
- package/lib/common/protocol.selectionRange.js +20 -0
- package/lib/common/protocol.semanticTokens.d.ts +194 -0
- package/lib/common/protocol.semanticTokens.js +51 -0
- package/lib/common/protocol.showDocument.d.ts +71 -0
- package/lib/common/protocol.showDocument.js +22 -0
- package/lib/common/protocol.typeDefinition.d.ts +38 -0
- package/lib/common/protocol.typeDefinition.js +22 -0
- package/lib/common/protocol.workspaceFolders.d.ts +94 -0
- package/lib/common/protocol.workspaceFolders.js +24 -0
- package/lib/common/utils/is.d.ts +9 -0
- package/lib/common/utils/is.js +47 -0
- package/lib/node/main.d.ts +6 -0
- package/lib/node/main.js +25 -0
- package/node.cmd +5 -0
- package/node.d.ts +6 -0
- package/node.js +7 -0
- package/package.json +38 -0
- package/thirdpartynotices.txt +31 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { Range } from 'vscode-languageserver-types';
|
|
3
|
+
import { ProtocolRequestType } from './messages';
|
|
4
|
+
import { StaticRegistrationOptions, TextDocumentPositionParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* Client capabilities for the linked editing range request.
|
|
7
|
+
*
|
|
8
|
+
* @since 3.16.0
|
|
9
|
+
*/
|
|
10
|
+
export interface LinkedEditingRangeClientCapabilities {
|
|
11
|
+
/**
|
|
12
|
+
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
13
|
+
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
|
|
14
|
+
* return value for the corresponding server capability as well.
|
|
15
|
+
*/
|
|
16
|
+
dynamicRegistration?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface LinkedEditingRangeParams extends TextDocumentPositionParams, WorkDoneProgressParams {
|
|
19
|
+
}
|
|
20
|
+
export interface LinkedEditingRangeOptions extends WorkDoneProgressOptions {
|
|
21
|
+
}
|
|
22
|
+
export interface LinkedEditingRangeRegistrationOptions extends TextDocumentRegistrationOptions, LinkedEditingRangeOptions, StaticRegistrationOptions {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The result of a linked editing range request.
|
|
26
|
+
*
|
|
27
|
+
* @since 3.16.0
|
|
28
|
+
*/
|
|
29
|
+
export interface LinkedEditingRanges {
|
|
30
|
+
/**
|
|
31
|
+
* A list of ranges that can be edited together. The ranges must have
|
|
32
|
+
* identical length and contain identical text content. The ranges cannot overlap.
|
|
33
|
+
*/
|
|
34
|
+
ranges: Range[];
|
|
35
|
+
/**
|
|
36
|
+
* An optional word pattern (regular expression) that describes valid contents for
|
|
37
|
+
* the given ranges. If no pattern is provided, the client configuration's word
|
|
38
|
+
* pattern will be used.
|
|
39
|
+
*/
|
|
40
|
+
wordPattern?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A request to provide ranges that can be edited together.
|
|
44
|
+
*
|
|
45
|
+
* @since 3.16.0
|
|
46
|
+
*/
|
|
47
|
+
export declare namespace LinkedEditingRangeRequest {
|
|
48
|
+
const method: 'textDocument/linkedEditingRange';
|
|
49
|
+
const type: ProtocolRequestType<LinkedEditingRangeParams, LinkedEditingRanges | null, void, any, LinkedEditingRangeRegistrationOptions>;
|
|
50
|
+
type HandlerSignature = RequestHandler<LinkedEditingRangeParams, LinkedEditingRanges | null, void>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.LinkedEditingRangeRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* A request to provide ranges that can be edited together.
|
|
11
|
+
*
|
|
12
|
+
* @since 3.16.0
|
|
13
|
+
*/
|
|
14
|
+
var LinkedEditingRangeRequest;
|
|
15
|
+
(function (LinkedEditingRangeRequest) {
|
|
16
|
+
LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange';
|
|
17
|
+
LinkedEditingRangeRequest.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest.method);
|
|
18
|
+
})(LinkedEditingRangeRequest = exports.LinkedEditingRangeRequest || (exports.LinkedEditingRangeRequest = {}));
|
|
19
|
+
//# sourceMappingURL=protocol.linkedEditingRange.js.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { ProtocolRequestType } from './messages';
|
|
2
|
+
import { WorkDoneProgressOptions, WorkDoneProgressParams, PartialResultParams, TextDocumentRegistrationOptions, TextDocumentPositionParams } from './protocol';
|
|
3
|
+
/**
|
|
4
|
+
* Moniker uniqueness level to define scope of the moniker.
|
|
5
|
+
*
|
|
6
|
+
* @since 3.16.0
|
|
7
|
+
*/
|
|
8
|
+
export declare enum UniquenessLevel {
|
|
9
|
+
/**
|
|
10
|
+
* The moniker is only unique inside a document
|
|
11
|
+
*/
|
|
12
|
+
document = "document",
|
|
13
|
+
/**
|
|
14
|
+
* The moniker is unique inside a project for which a dump got created
|
|
15
|
+
*/
|
|
16
|
+
project = "project",
|
|
17
|
+
/**
|
|
18
|
+
* The moniker is unique inside the group to which a project belongs
|
|
19
|
+
*/
|
|
20
|
+
group = "group",
|
|
21
|
+
/**
|
|
22
|
+
* The moniker is unique inside the moniker scheme.
|
|
23
|
+
*/
|
|
24
|
+
scheme = "scheme",
|
|
25
|
+
/**
|
|
26
|
+
* The moniker is globally unique
|
|
27
|
+
*/
|
|
28
|
+
global = "global"
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The moniker kind.
|
|
32
|
+
*
|
|
33
|
+
* @since 3.16.0
|
|
34
|
+
*/
|
|
35
|
+
export declare enum MonikerKind {
|
|
36
|
+
/**
|
|
37
|
+
* The moniker represent a symbol that is imported into a project
|
|
38
|
+
*/
|
|
39
|
+
import = "import",
|
|
40
|
+
/**
|
|
41
|
+
* The moniker represents a symbol that is exported from a project
|
|
42
|
+
*/
|
|
43
|
+
export = "export",
|
|
44
|
+
/**
|
|
45
|
+
* The moniker represents a symbol that is local to a project (e.g. a local
|
|
46
|
+
* variable of a function, a class not visible outside the project, ...)
|
|
47
|
+
*/
|
|
48
|
+
local = "local"
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Moniker definition to match LSIF 0.5 moniker definition.
|
|
52
|
+
*
|
|
53
|
+
* @since 3.16.0
|
|
54
|
+
*/
|
|
55
|
+
export interface Moniker {
|
|
56
|
+
/**
|
|
57
|
+
* The scheme of the moniker. For example tsc or .Net
|
|
58
|
+
*/
|
|
59
|
+
scheme: string;
|
|
60
|
+
/**
|
|
61
|
+
* The identifier of the moniker. The value is opaque in LSIF however
|
|
62
|
+
* schema owners are allowed to define the structure if they want.
|
|
63
|
+
*/
|
|
64
|
+
identifier: string;
|
|
65
|
+
/**
|
|
66
|
+
* The scope in which the moniker is unique
|
|
67
|
+
*/
|
|
68
|
+
unique: UniquenessLevel;
|
|
69
|
+
/**
|
|
70
|
+
* The moniker kind if known.
|
|
71
|
+
*/
|
|
72
|
+
kind?: MonikerKind;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Client capabilities specific to the moniker request.
|
|
76
|
+
*
|
|
77
|
+
* @since 3.16.0
|
|
78
|
+
*/
|
|
79
|
+
export interface MonikerClientCapabilities {
|
|
80
|
+
/**
|
|
81
|
+
* Whether moniker supports dynamic registration. If this is set to `true`
|
|
82
|
+
* the client supports the new `MonikerRegistrationOptions` return value
|
|
83
|
+
* for the corresponding server capability as well.
|
|
84
|
+
*/
|
|
85
|
+
dynamicRegistration?: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface MonikerServerCapabilities {
|
|
88
|
+
}
|
|
89
|
+
export interface MonikerOptions extends WorkDoneProgressOptions {
|
|
90
|
+
}
|
|
91
|
+
export interface MonikerRegistrationOptions extends TextDocumentRegistrationOptions, MonikerOptions {
|
|
92
|
+
}
|
|
93
|
+
export interface MonikerParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A request to get the moniker of a symbol at a given text document position.
|
|
97
|
+
* The request parameter is of type [TextDocumentPositionParams](#TextDocumentPositionParams).
|
|
98
|
+
* The response is of type [Moniker[]](#Moniker[]) or `null`.
|
|
99
|
+
*/
|
|
100
|
+
export declare namespace MonikerRequest {
|
|
101
|
+
const method: 'textDocument/moniker';
|
|
102
|
+
const type: ProtocolRequestType<MonikerParams, Moniker[] | null, Moniker[], void, MonikerRegistrationOptions>;
|
|
103
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* Moniker uniqueness level to define scope of the moniker.
|
|
11
|
+
*
|
|
12
|
+
* @since 3.16.0
|
|
13
|
+
*/
|
|
14
|
+
var UniquenessLevel;
|
|
15
|
+
(function (UniquenessLevel) {
|
|
16
|
+
/**
|
|
17
|
+
* The moniker is only unique inside a document
|
|
18
|
+
*/
|
|
19
|
+
UniquenessLevel["document"] = "document";
|
|
20
|
+
/**
|
|
21
|
+
* The moniker is unique inside a project for which a dump got created
|
|
22
|
+
*/
|
|
23
|
+
UniquenessLevel["project"] = "project";
|
|
24
|
+
/**
|
|
25
|
+
* The moniker is unique inside the group to which a project belongs
|
|
26
|
+
*/
|
|
27
|
+
UniquenessLevel["group"] = "group";
|
|
28
|
+
/**
|
|
29
|
+
* The moniker is unique inside the moniker scheme.
|
|
30
|
+
*/
|
|
31
|
+
UniquenessLevel["scheme"] = "scheme";
|
|
32
|
+
/**
|
|
33
|
+
* The moniker is globally unique
|
|
34
|
+
*/
|
|
35
|
+
UniquenessLevel["global"] = "global";
|
|
36
|
+
})(UniquenessLevel = exports.UniquenessLevel || (exports.UniquenessLevel = {}));
|
|
37
|
+
/**
|
|
38
|
+
* The moniker kind.
|
|
39
|
+
*
|
|
40
|
+
* @since 3.16.0
|
|
41
|
+
*/
|
|
42
|
+
var MonikerKind;
|
|
43
|
+
(function (MonikerKind) {
|
|
44
|
+
/**
|
|
45
|
+
* The moniker represent a symbol that is imported into a project
|
|
46
|
+
*/
|
|
47
|
+
MonikerKind["import"] = "import";
|
|
48
|
+
/**
|
|
49
|
+
* The moniker represents a symbol that is exported from a project
|
|
50
|
+
*/
|
|
51
|
+
MonikerKind["export"] = "export";
|
|
52
|
+
/**
|
|
53
|
+
* The moniker represents a symbol that is local to a project (e.g. a local
|
|
54
|
+
* variable of a function, a class not visible outside the project, ...)
|
|
55
|
+
*/
|
|
56
|
+
MonikerKind["local"] = "local";
|
|
57
|
+
})(MonikerKind = exports.MonikerKind || (exports.MonikerKind = {}));
|
|
58
|
+
/**
|
|
59
|
+
* A request to get the moniker of a symbol at a given text document position.
|
|
60
|
+
* The request parameter is of type [TextDocumentPositionParams](#TextDocumentPositionParams).
|
|
61
|
+
* The response is of type [Moniker[]](#Moniker[]) or `null`.
|
|
62
|
+
*/
|
|
63
|
+
var MonikerRequest;
|
|
64
|
+
(function (MonikerRequest) {
|
|
65
|
+
MonikerRequest.method = 'textDocument/moniker';
|
|
66
|
+
MonikerRequest.type = new messages_1.ProtocolRequestType(MonikerRequest.method);
|
|
67
|
+
})(MonikerRequest = exports.MonikerRequest || (exports.MonikerRequest = {}));
|
|
68
|
+
//# sourceMappingURL=protocol.moniker.js.map
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { NotificationHandler, RequestHandler, ProgressType, ProgressToken } from 'vscode-jsonrpc';
|
|
2
|
+
import { uinteger } from 'vscode-languageserver-types';
|
|
3
|
+
import { ProtocolRequestType, ProtocolNotificationType } from './messages';
|
|
4
|
+
export interface WorkDoneProgressClientCapabilities {
|
|
5
|
+
/**
|
|
6
|
+
* Window specific client capabilities.
|
|
7
|
+
*/
|
|
8
|
+
window?: {
|
|
9
|
+
/**
|
|
10
|
+
* Whether client supports server initiated progress using the
|
|
11
|
+
* `window/workDoneProgress/create` request.
|
|
12
|
+
*
|
|
13
|
+
* Since 3.15.0
|
|
14
|
+
*/
|
|
15
|
+
workDoneProgress?: boolean;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface WorkDoneProgressBegin {
|
|
19
|
+
kind: 'begin';
|
|
20
|
+
/**
|
|
21
|
+
* Mandatory title of the progress operation. Used to briefly inform about
|
|
22
|
+
* the kind of operation being performed.
|
|
23
|
+
*
|
|
24
|
+
* Examples: "Indexing" or "Linking dependencies".
|
|
25
|
+
*/
|
|
26
|
+
title: string;
|
|
27
|
+
/**
|
|
28
|
+
* Controls if a cancel button should show to allow the user to cancel the
|
|
29
|
+
* long running operation. Clients that don't support cancellation are allowed
|
|
30
|
+
* to ignore the setting.
|
|
31
|
+
*/
|
|
32
|
+
cancellable?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Optional, more detailed associated progress message. Contains
|
|
35
|
+
* complementary information to the `title`.
|
|
36
|
+
*
|
|
37
|
+
* Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
|
|
38
|
+
* If unset, the previous progress message (if any) is still valid.
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Optional progress percentage to display (value 100 is considered 100%).
|
|
43
|
+
* If not provided infinite progress is assumed and clients are allowed
|
|
44
|
+
* to ignore the `percentage` value in subsequent in report notifications.
|
|
45
|
+
*
|
|
46
|
+
* The value should be steadily rising. Clients are free to ignore values
|
|
47
|
+
* that are not following this rule. The value range is [0, 100].
|
|
48
|
+
*/
|
|
49
|
+
percentage?: uinteger;
|
|
50
|
+
}
|
|
51
|
+
export interface WorkDoneProgressReport {
|
|
52
|
+
kind: 'report';
|
|
53
|
+
/**
|
|
54
|
+
* Controls enablement state of a cancel button.
|
|
55
|
+
*
|
|
56
|
+
* Clients that don't support cancellation or don't support controlling the button's
|
|
57
|
+
* enablement state are allowed to ignore the property.
|
|
58
|
+
*/
|
|
59
|
+
cancellable?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Optional, more detailed associated progress message. Contains
|
|
62
|
+
* complementary information to the `title`.
|
|
63
|
+
*
|
|
64
|
+
* Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
|
|
65
|
+
* If unset, the previous progress message (if any) is still valid.
|
|
66
|
+
*/
|
|
67
|
+
message?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Optional progress percentage to display (value 100 is considered 100%).
|
|
70
|
+
* If not provided infinite progress is assumed and clients are allowed
|
|
71
|
+
* to ignore the `percentage` value in subsequent in report notifications.
|
|
72
|
+
*
|
|
73
|
+
* The value should be steadily rising. Clients are free to ignore values
|
|
74
|
+
* that are not following this rule. The value range is [0, 100]
|
|
75
|
+
*/
|
|
76
|
+
percentage?: uinteger;
|
|
77
|
+
}
|
|
78
|
+
export interface WorkDoneProgressEnd {
|
|
79
|
+
kind: 'end';
|
|
80
|
+
/**
|
|
81
|
+
* Optional, a final message indicating to for example indicate the outcome
|
|
82
|
+
* of the operation.
|
|
83
|
+
*/
|
|
84
|
+
message?: string;
|
|
85
|
+
}
|
|
86
|
+
export declare namespace WorkDoneProgress {
|
|
87
|
+
const type: ProgressType<WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd>;
|
|
88
|
+
function is(value: ProgressType<any>): value is typeof type;
|
|
89
|
+
}
|
|
90
|
+
export interface WorkDoneProgressCreateParams {
|
|
91
|
+
/**
|
|
92
|
+
* The token to be used to report progress.
|
|
93
|
+
*/
|
|
94
|
+
token: ProgressToken;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
|
|
98
|
+
* reporting from the server.
|
|
99
|
+
*/
|
|
100
|
+
export declare namespace WorkDoneProgressCreateRequest {
|
|
101
|
+
const type: ProtocolRequestType<WorkDoneProgressCreateParams, void, never, void, void>;
|
|
102
|
+
type HandlerSignature = RequestHandler<WorkDoneProgressCreateParams, void, void>;
|
|
103
|
+
}
|
|
104
|
+
export interface WorkDoneProgressCancelParams {
|
|
105
|
+
/**
|
|
106
|
+
* The token to be used to report progress.
|
|
107
|
+
*/
|
|
108
|
+
token: ProgressToken;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
|
|
112
|
+
* initiated on the server side.
|
|
113
|
+
*/
|
|
114
|
+
export declare namespace WorkDoneProgressCancelNotification {
|
|
115
|
+
const type: ProtocolNotificationType<WorkDoneProgressCancelParams, void>;
|
|
116
|
+
type HandlerSignature = NotificationHandler<WorkDoneProgressCancelParams>;
|
|
117
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = void 0;
|
|
8
|
+
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
9
|
+
const messages_1 = require("./messages");
|
|
10
|
+
var WorkDoneProgress;
|
|
11
|
+
(function (WorkDoneProgress) {
|
|
12
|
+
WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
|
|
13
|
+
function is(value) {
|
|
14
|
+
return value === WorkDoneProgress.type;
|
|
15
|
+
}
|
|
16
|
+
WorkDoneProgress.is = is;
|
|
17
|
+
})(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
|
|
18
|
+
/**
|
|
19
|
+
* The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
|
|
20
|
+
* reporting from the server.
|
|
21
|
+
*/
|
|
22
|
+
var WorkDoneProgressCreateRequest;
|
|
23
|
+
(function (WorkDoneProgressCreateRequest) {
|
|
24
|
+
WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
|
|
25
|
+
})(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
|
|
26
|
+
/**
|
|
27
|
+
* The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
|
|
28
|
+
* initiated on the server side.
|
|
29
|
+
*/
|
|
30
|
+
var WorkDoneProgressCancelNotification;
|
|
31
|
+
(function (WorkDoneProgressCancelNotification) {
|
|
32
|
+
WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
|
|
33
|
+
})(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
|
|
34
|
+
//# sourceMappingURL=protocol.progress.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { TextDocumentIdentifier, Position, SelectionRange } from 'vscode-languageserver-types';
|
|
3
|
+
import { ProtocolRequestType } from './messages';
|
|
4
|
+
import { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams, PartialResultParams } from './protocol';
|
|
5
|
+
export interface SelectionRangeClientCapabilities {
|
|
6
|
+
/**
|
|
7
|
+
* Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
|
|
8
|
+
* the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
|
|
9
|
+
* capability as well.
|
|
10
|
+
*/
|
|
11
|
+
dynamicRegistration?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface SelectionRangeOptions extends WorkDoneProgressOptions {
|
|
14
|
+
}
|
|
15
|
+
export interface SelectionRangeRegistrationOptions extends SelectionRangeOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A parameter literal used in selection range requests.
|
|
19
|
+
*/
|
|
20
|
+
export interface SelectionRangeParams extends WorkDoneProgressParams, PartialResultParams {
|
|
21
|
+
/**
|
|
22
|
+
* The text document.
|
|
23
|
+
*/
|
|
24
|
+
textDocument: TextDocumentIdentifier;
|
|
25
|
+
/**
|
|
26
|
+
* The positions inside the text document.
|
|
27
|
+
*/
|
|
28
|
+
positions: Position[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A request to provide selection ranges in a document. The request's
|
|
32
|
+
* parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
|
|
33
|
+
* response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
|
|
34
|
+
* that resolves to such.
|
|
35
|
+
*/
|
|
36
|
+
export declare namespace SelectionRangeRequest {
|
|
37
|
+
const method: 'textDocument/selectionRange';
|
|
38
|
+
const type: ProtocolRequestType<SelectionRangeParams, SelectionRange[] | null, SelectionRange[], any, SelectionRangeRegistrationOptions>;
|
|
39
|
+
type HandlerSignature = RequestHandler<SelectionRangeParams, SelectionRange[] | null, void>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.SelectionRangeRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* A request to provide selection ranges in a document. The request's
|
|
11
|
+
* parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
|
|
12
|
+
* response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
|
|
13
|
+
* that resolves to such.
|
|
14
|
+
*/
|
|
15
|
+
var SelectionRangeRequest;
|
|
16
|
+
(function (SelectionRangeRequest) {
|
|
17
|
+
SelectionRangeRequest.method = 'textDocument/selectionRange';
|
|
18
|
+
SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
|
|
19
|
+
})(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
|
|
20
|
+
//# sourceMappingURL=protocol.selectionRange.js.map
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { TextDocumentIdentifier, Range, uinteger, SemanticTokensEdit, SemanticTokensLegend, SemanticTokens, SemanticTokensDelta } from 'vscode-languageserver-types';
|
|
2
|
+
import { RequestHandler0, RequestHandler } from 'vscode-jsonrpc';
|
|
3
|
+
import { ProtocolRequestType, ProtocolRequestType0, RegistrationType } from './messages';
|
|
4
|
+
import { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* @since 3.16.0
|
|
7
|
+
*/
|
|
8
|
+
export interface SemanticTokensPartialResult {
|
|
9
|
+
data: uinteger[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @since 3.16.0
|
|
13
|
+
*/
|
|
14
|
+
export interface SemanticTokensDeltaPartialResult {
|
|
15
|
+
edits: SemanticTokensEdit[];
|
|
16
|
+
}
|
|
17
|
+
export declare namespace TokenFormat {
|
|
18
|
+
const Relative: 'relative';
|
|
19
|
+
}
|
|
20
|
+
export declare type TokenFormat = 'relative';
|
|
21
|
+
/**
|
|
22
|
+
* @since 3.16.0
|
|
23
|
+
*/
|
|
24
|
+
export interface SemanticTokensClientCapabilities {
|
|
25
|
+
/**
|
|
26
|
+
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
27
|
+
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
|
|
28
|
+
* return value for the corresponding server capability as well.
|
|
29
|
+
*/
|
|
30
|
+
dynamicRegistration?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Which requests the client supports and might send to the server
|
|
33
|
+
* depending on the server's capability. Please note that clients might not
|
|
34
|
+
* show semantic tokens or degrade some of the user experience if a range
|
|
35
|
+
* or full request is advertised by the client but not provided by the
|
|
36
|
+
* server. If for example the client capability `requests.full` and
|
|
37
|
+
* `request.range` are both set to true but the server only provides a
|
|
38
|
+
* range provider the client might not render a minimap correctly or might
|
|
39
|
+
* even decide to not show any semantic tokens at all.
|
|
40
|
+
*/
|
|
41
|
+
requests: {
|
|
42
|
+
/**
|
|
43
|
+
* The client will send the `textDocument/semanticTokens/range` request if
|
|
44
|
+
* the server provides a corresponding handler.
|
|
45
|
+
*/
|
|
46
|
+
range?: boolean | {};
|
|
47
|
+
/**
|
|
48
|
+
* The client will send the `textDocument/semanticTokens/full` request if
|
|
49
|
+
* the server provides a corresponding handler.
|
|
50
|
+
*/
|
|
51
|
+
full?: boolean | {
|
|
52
|
+
/**
|
|
53
|
+
* The client will send the `textDocument/semanticTokens/full/delta` request if
|
|
54
|
+
* the server provides a corresponding handler.
|
|
55
|
+
*/
|
|
56
|
+
delta?: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* The token types that the client supports.
|
|
61
|
+
*/
|
|
62
|
+
tokenTypes: string[];
|
|
63
|
+
/**
|
|
64
|
+
* The token modifiers that the client supports.
|
|
65
|
+
*/
|
|
66
|
+
tokenModifiers: string[];
|
|
67
|
+
/**
|
|
68
|
+
* The token formats the clients supports.
|
|
69
|
+
*/
|
|
70
|
+
formats: TokenFormat[];
|
|
71
|
+
/**
|
|
72
|
+
* Whether the client supports tokens that can overlap each other.
|
|
73
|
+
*/
|
|
74
|
+
overlappingTokenSupport?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Whether the client supports tokens that can span multiple lines.
|
|
77
|
+
*/
|
|
78
|
+
multilineTokenSupport?: boolean;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @since 3.16.0
|
|
82
|
+
*/
|
|
83
|
+
export interface SemanticTokensOptions extends WorkDoneProgressOptions {
|
|
84
|
+
/**
|
|
85
|
+
* The legend used by the server
|
|
86
|
+
*/
|
|
87
|
+
legend: SemanticTokensLegend;
|
|
88
|
+
/**
|
|
89
|
+
* Server supports providing semantic tokens for a specific range
|
|
90
|
+
* of a document.
|
|
91
|
+
*/
|
|
92
|
+
range?: boolean | {};
|
|
93
|
+
/**
|
|
94
|
+
* Server supports providing semantic tokens for a full document.
|
|
95
|
+
*/
|
|
96
|
+
full?: boolean | {
|
|
97
|
+
/**
|
|
98
|
+
* The server supports deltas for full documents.
|
|
99
|
+
*/
|
|
100
|
+
delta?: boolean;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @since 3.16.0
|
|
105
|
+
*/
|
|
106
|
+
export interface SemanticTokensRegistrationOptions extends TextDocumentRegistrationOptions, SemanticTokensOptions, StaticRegistrationOptions {
|
|
107
|
+
}
|
|
108
|
+
export declare namespace SemanticTokensRegistrationType {
|
|
109
|
+
const method: 'textDocument/semanticTokens';
|
|
110
|
+
const type: RegistrationType<SemanticTokensRegistrationOptions>;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* @since 3.16.0
|
|
114
|
+
*/
|
|
115
|
+
export interface SemanticTokensParams extends WorkDoneProgressParams, PartialResultParams {
|
|
116
|
+
/**
|
|
117
|
+
* The text document.
|
|
118
|
+
*/
|
|
119
|
+
textDocument: TextDocumentIdentifier;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @since 3.16.0
|
|
123
|
+
*/
|
|
124
|
+
export declare namespace SemanticTokensRequest {
|
|
125
|
+
const method: 'textDocument/semanticTokens/full';
|
|
126
|
+
const type: ProtocolRequestType<SemanticTokensParams, SemanticTokens | null, SemanticTokensPartialResult, void, SemanticTokensRegistrationOptions>;
|
|
127
|
+
type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | null, void>;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* @since 3.16.0
|
|
131
|
+
*/
|
|
132
|
+
export interface SemanticTokensDeltaParams extends WorkDoneProgressParams, PartialResultParams {
|
|
133
|
+
/**
|
|
134
|
+
* The text document.
|
|
135
|
+
*/
|
|
136
|
+
textDocument: TextDocumentIdentifier;
|
|
137
|
+
/**
|
|
138
|
+
* The result id of a previous response. The result Id can either point to a full response
|
|
139
|
+
* or a delta response depending on what was received last.
|
|
140
|
+
*/
|
|
141
|
+
previousResultId: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @since 3.16.0
|
|
145
|
+
*/
|
|
146
|
+
export declare namespace SemanticTokensDeltaRequest {
|
|
147
|
+
const method: 'textDocument/semanticTokens/full/delta';
|
|
148
|
+
const type: ProtocolRequestType<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, SemanticTokensPartialResult | SemanticTokensDeltaPartialResult, void, SemanticTokensRegistrationOptions>;
|
|
149
|
+
type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, void>;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* @since 3.16.0
|
|
153
|
+
*/
|
|
154
|
+
export interface SemanticTokensRangeParams extends WorkDoneProgressParams, PartialResultParams {
|
|
155
|
+
/**
|
|
156
|
+
* The text document.
|
|
157
|
+
*/
|
|
158
|
+
textDocument: TextDocumentIdentifier;
|
|
159
|
+
/**
|
|
160
|
+
* The range the semantic tokens are requested for.
|
|
161
|
+
*/
|
|
162
|
+
range: Range;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* @since 3.16.0
|
|
166
|
+
*/
|
|
167
|
+
export declare namespace SemanticTokensRangeRequest {
|
|
168
|
+
const method: 'textDocument/semanticTokens/range';
|
|
169
|
+
const type: ProtocolRequestType<SemanticTokensRangeParams, SemanticTokens | null, SemanticTokensPartialResult, void, void>;
|
|
170
|
+
type HandlerSignature = RequestHandler<SemanticTokensRangeParams, SemanticTokens | null, void>;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* @since 3.16.0
|
|
174
|
+
*/
|
|
175
|
+
export interface SemanticTokensWorkspaceClientCapabilities {
|
|
176
|
+
/**
|
|
177
|
+
* Whether the client implementation supports a refresh request sent from
|
|
178
|
+
* the server to the client.
|
|
179
|
+
*
|
|
180
|
+
* Note that this event is global and will force the client to refresh all
|
|
181
|
+
* semantic tokens currently shown. It should be used with absolute care
|
|
182
|
+
* and is useful for situation where a server for example detects a project
|
|
183
|
+
* wide change that requires such a calculation.
|
|
184
|
+
*/
|
|
185
|
+
refreshSupport?: boolean;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* @since 3.16.0
|
|
189
|
+
*/
|
|
190
|
+
export declare namespace SemanticTokensRefreshRequest {
|
|
191
|
+
const method: `workspace/semanticTokens/refresh`;
|
|
192
|
+
const type: ProtocolRequestType0<void, void, void, void>;
|
|
193
|
+
type HandlerSignature = RequestHandler0<void, void>;
|
|
194
|
+
}
|