vscode-languageserver-protocol 3.15.0-next.5 → 3.15.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/.eslintrc.json +6 -0
- package/lib/main.d.ts +31 -30
- package/lib/main.js +14 -21
- package/lib/protocol.callHierarchy.proposed.d.ts +10 -5
- package/lib/protocol.callHierarchy.proposed.js +1 -0
- package/lib/protocol.colorProvider.d.ts +19 -26
- package/lib/protocol.colorProvider.js +1 -0
- package/lib/protocol.configuration.d.ts +2 -1
- package/lib/protocol.d.ts +1051 -583
- package/lib/protocol.declaration.d.ts +20 -26
- package/lib/protocol.declaration.js +1 -0
- package/lib/protocol.foldingRange.d.ts +22 -34
- package/lib/protocol.foldingRange.js +1 -0
- package/lib/protocol.implementation.d.ts +22 -26
- package/lib/protocol.implementation.js +1 -0
- package/lib/protocol.js +139 -52
- package/lib/protocol.progress.proposed.d.ts +42 -43
- package/lib/protocol.progress.proposed.js +15 -27
- package/lib/protocol.selectionRange.d.ts +39 -0
- package/lib/{protocol.selectionRange.proposed.js → protocol.selectionRange.js} +1 -22
- package/lib/protocol.typeDefinition.d.ts +22 -26
- package/lib/protocol.typeDefinition.js +1 -0
- package/lib/utils/is.d.ts +1 -0
- package/lib/utils/is.js +7 -0
- package/package.json +5 -5
- package/vscode-languageserver-protocol.lsif +18295 -0
- package/lib/protocol.selectionRange.proposed.d.ts +0 -77
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { NotificationType, NotificationHandler } from 'vscode-jsonrpc';
|
|
2
|
-
export interface
|
|
1
|
+
import { NotificationType, NotificationHandler, RequestType, RequestHandler, ProgressType, ProgressToken } from 'vscode-jsonrpc';
|
|
2
|
+
export interface WorkDoneProgressClientCapabilities {
|
|
3
3
|
/**
|
|
4
4
|
* Window specific client capabilities.
|
|
5
5
|
*/
|
|
6
6
|
window?: {
|
|
7
7
|
/**
|
|
8
|
-
* Whether client supports handling progress notifications.
|
|
8
|
+
* Whether client supports handling progress notifications. If set servers are allowed to
|
|
9
|
+
* report in `workDoneProgress` property in the request specific server capabilities.
|
|
10
|
+
*
|
|
11
|
+
* Since 3.15.0
|
|
9
12
|
*/
|
|
10
|
-
|
|
13
|
+
workDoneProgress?: boolean;
|
|
11
14
|
};
|
|
12
15
|
}
|
|
13
|
-
export interface
|
|
14
|
-
|
|
15
|
-
* A unique identifier to associate multiple progress notifications with
|
|
16
|
-
* the same progress.
|
|
17
|
-
*/
|
|
18
|
-
id: string;
|
|
16
|
+
export interface WorkDoneProgressBegin {
|
|
17
|
+
kind: 'begin';
|
|
19
18
|
/**
|
|
20
19
|
* Mandatory title of the progress operation. Used to briefly inform about
|
|
21
20
|
* the kind of operation being performed.
|
|
@@ -47,19 +46,16 @@ export interface ProgressStartParams {
|
|
|
47
46
|
*/
|
|
48
47
|
percentage?: number;
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
* to initiate a progress.
|
|
53
|
-
*/
|
|
54
|
-
export declare namespace ProgressStartNotification {
|
|
55
|
-
const type: NotificationType<ProgressStartParams, void>;
|
|
56
|
-
type HandlerSignature = NotificationHandler<ProgressStartParams>;
|
|
57
|
-
}
|
|
58
|
-
export interface ProgressReportParams {
|
|
49
|
+
export interface WorkDoneProgressReport {
|
|
50
|
+
kind: 'report';
|
|
59
51
|
/**
|
|
60
|
-
*
|
|
52
|
+
* Controls enablement state of a cancel button. This property is only valid if a cancel
|
|
53
|
+
* button got requested in the `WorkDoneProgressStart` payload.
|
|
54
|
+
*
|
|
55
|
+
* Clients that don't support cancellation or don't support control the button's
|
|
56
|
+
* enablement state are allowed to ignore the setting.
|
|
61
57
|
*/
|
|
62
|
-
|
|
58
|
+
cancellable?: boolean;
|
|
63
59
|
/**
|
|
64
60
|
* Optional, more detailed associated progress message. Contains
|
|
65
61
|
* complementary information to the `title`.
|
|
@@ -78,39 +74,42 @@ export interface ProgressReportParams {
|
|
|
78
74
|
*/
|
|
79
75
|
percentage?: number;
|
|
80
76
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
export interface WorkDoneProgressEnd {
|
|
78
|
+
kind: 'end';
|
|
79
|
+
/**
|
|
80
|
+
* Optional, a final message indicating to for example indicate the outcome
|
|
81
|
+
* of the operation.
|
|
82
|
+
*/
|
|
83
|
+
message?: string;
|
|
84
|
+
}
|
|
85
|
+
export declare namespace WorkDoneProgress {
|
|
86
|
+
const type: ProgressType<WorkDoneProgressBegin | WorkDoneProgressReport | WorkDoneProgressEnd>;
|
|
88
87
|
}
|
|
89
|
-
export interface
|
|
88
|
+
export interface WorkDoneProgressCreateParams {
|
|
90
89
|
/**
|
|
91
|
-
*
|
|
90
|
+
* The token to be used to report progress.
|
|
92
91
|
*/
|
|
93
|
-
|
|
92
|
+
token: ProgressToken;
|
|
94
93
|
}
|
|
95
94
|
/**
|
|
96
|
-
* The `window/
|
|
97
|
-
*
|
|
95
|
+
* The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
|
|
96
|
+
* reporting from the server.
|
|
98
97
|
*/
|
|
99
|
-
export declare namespace
|
|
100
|
-
const type:
|
|
101
|
-
type HandlerSignature =
|
|
98
|
+
export declare namespace WorkDoneProgressCreateRequest {
|
|
99
|
+
const type: RequestType<WorkDoneProgressCreateParams, void, void, void>;
|
|
100
|
+
type HandlerSignature = RequestHandler<WorkDoneProgressCreateParams, void, void>;
|
|
102
101
|
}
|
|
103
|
-
export interface
|
|
102
|
+
export interface WorkDoneProgressCancelParams {
|
|
104
103
|
/**
|
|
105
|
-
*
|
|
104
|
+
* The token to be used to report progress.
|
|
106
105
|
*/
|
|
107
|
-
|
|
106
|
+
token: ProgressToken;
|
|
108
107
|
}
|
|
109
108
|
/**
|
|
110
|
-
* The `window/
|
|
109
|
+
* The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
|
|
111
110
|
* initiated on the server side.
|
|
112
111
|
*/
|
|
113
|
-
export declare namespace
|
|
114
|
-
const type: NotificationType<
|
|
115
|
-
type HandlerSignature = NotificationHandler<
|
|
112
|
+
export declare namespace WorkDoneProgressCancelNotification {
|
|
113
|
+
const type: NotificationType<WorkDoneProgressCancelParams, void>;
|
|
114
|
+
type HandlerSignature = NotificationHandler<WorkDoneProgressCancelParams>;
|
|
116
115
|
}
|
|
@@ -5,35 +5,23 @@
|
|
|
5
5
|
'use strict';
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
8
|
+
var WorkDoneProgress;
|
|
9
|
+
(function (WorkDoneProgress) {
|
|
10
|
+
WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
|
|
11
|
+
})(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
|
|
8
12
|
/**
|
|
9
|
-
* The `window/
|
|
10
|
-
*
|
|
13
|
+
* The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
|
|
14
|
+
* reporting from the server.
|
|
11
15
|
*/
|
|
12
|
-
var
|
|
13
|
-
(function (
|
|
14
|
-
|
|
15
|
-
})(
|
|
16
|
+
var WorkDoneProgressCreateRequest;
|
|
17
|
+
(function (WorkDoneProgressCreateRequest) {
|
|
18
|
+
WorkDoneProgressCreateRequest.type = new vscode_jsonrpc_1.RequestType('window/workDoneProgress/create');
|
|
19
|
+
})(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
|
|
16
20
|
/**
|
|
17
|
-
* The `window/
|
|
18
|
-
* to initiate a progress.
|
|
19
|
-
*/
|
|
20
|
-
var ProgressReportNotification;
|
|
21
|
-
(function (ProgressReportNotification) {
|
|
22
|
-
ProgressReportNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/report');
|
|
23
|
-
})(ProgressReportNotification = exports.ProgressReportNotification || (exports.ProgressReportNotification = {}));
|
|
24
|
-
/**
|
|
25
|
-
* The `window/progress/done` notification is sent from the server to the client
|
|
26
|
-
* to initiate a progress.
|
|
27
|
-
*/
|
|
28
|
-
var ProgressDoneNotification;
|
|
29
|
-
(function (ProgressDoneNotification) {
|
|
30
|
-
ProgressDoneNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/done');
|
|
31
|
-
})(ProgressDoneNotification = exports.ProgressDoneNotification || (exports.ProgressDoneNotification = {}));
|
|
32
|
-
/**
|
|
33
|
-
* The `window/progress/cancel` notification is sent client to the server to cancel a progress
|
|
21
|
+
* The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
|
|
34
22
|
* initiated on the server side.
|
|
35
23
|
*/
|
|
36
|
-
var
|
|
37
|
-
(function (
|
|
38
|
-
|
|
39
|
-
})(
|
|
24
|
+
var WorkDoneProgressCancelNotification;
|
|
25
|
+
(function (WorkDoneProgressCancelNotification) {
|
|
26
|
+
WorkDoneProgressCancelNotification.type = new vscode_jsonrpc_1.NotificationType('window/workDoneProgress/cancel');
|
|
27
|
+
})(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc';
|
|
2
|
+
import { TextDocumentIdentifier, Position, SelectionRange } from 'vscode-languageserver-types';
|
|
3
|
+
import { TextDocumentRegistrationOptions, WorkDoneProgressOptions, StaticRegistrationOptions, WorkDoneProgressParams, PartialResultParams } from './protocol';
|
|
4
|
+
export interface SelectionRangeClientCapabilities {
|
|
5
|
+
/**
|
|
6
|
+
* Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
|
|
7
|
+
* the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
|
|
8
|
+
* capability as well.
|
|
9
|
+
*/
|
|
10
|
+
dynamicRegistration?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface SelectionRangeOptions extends WorkDoneProgressOptions {
|
|
13
|
+
}
|
|
14
|
+
export interface SelectionRangeRegistrationOptions extends SelectionRangeOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A parameter literal used in selection range requests.
|
|
18
|
+
*/
|
|
19
|
+
export interface SelectionRangeParams extends WorkDoneProgressParams, PartialResultParams {
|
|
20
|
+
/**
|
|
21
|
+
* The text document.
|
|
22
|
+
*/
|
|
23
|
+
textDocument: TextDocumentIdentifier;
|
|
24
|
+
/**
|
|
25
|
+
* The positions inside the text document.
|
|
26
|
+
*/
|
|
27
|
+
positions: Position[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A request to provide selection ranges in a document. The request's
|
|
31
|
+
* parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
|
|
32
|
+
* response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
|
|
33
|
+
* that resolves to such.
|
|
34
|
+
*/
|
|
35
|
+
export declare namespace SelectionRangeRequest {
|
|
36
|
+
const type: RequestType<SelectionRangeParams, SelectionRange[] | null, any, SelectionRangeRegistrationOptions>;
|
|
37
|
+
const resultType: ProgressType<SelectionRange[]>;
|
|
38
|
+
type HandlerSignature = RequestHandler<SelectionRangeParams, SelectionRange[] | null, void>;
|
|
39
|
+
}
|
|
@@ -5,28 +5,6 @@
|
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
8
|
-
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
|
|
9
|
-
/**
|
|
10
|
-
* The SelectionRange namespace provides helper function to work with
|
|
11
|
-
* SelectionRange literals.
|
|
12
|
-
*/
|
|
13
|
-
var SelectionRange;
|
|
14
|
-
(function (SelectionRange) {
|
|
15
|
-
/**
|
|
16
|
-
* Creates a new SelectionRange
|
|
17
|
-
* @param range the range.
|
|
18
|
-
* @param parent an optional parent.
|
|
19
|
-
*/
|
|
20
|
-
function create(range, parent) {
|
|
21
|
-
return { range, parent };
|
|
22
|
-
}
|
|
23
|
-
SelectionRange.create = create;
|
|
24
|
-
function is(value) {
|
|
25
|
-
let candidate = value;
|
|
26
|
-
return candidate !== undefined && vscode_languageserver_types_1.Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
|
|
27
|
-
}
|
|
28
|
-
SelectionRange.is = is;
|
|
29
|
-
})(SelectionRange = exports.SelectionRange || (exports.SelectionRange = {}));
|
|
30
8
|
/**
|
|
31
9
|
* A request to provide selection ranges in a document. The request's
|
|
32
10
|
* parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
|
|
@@ -36,4 +14,5 @@ var SelectionRange;
|
|
|
36
14
|
var SelectionRangeRequest;
|
|
37
15
|
(function (SelectionRangeRequest) {
|
|
38
16
|
SelectionRangeRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/selectionRange');
|
|
17
|
+
SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
|
|
39
18
|
})(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
|
|
@@ -1,33 +1,28 @@
|
|
|
1
|
-
import { RequestType, RequestHandler } from 'vscode-jsonrpc';
|
|
1
|
+
import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc';
|
|
2
2
|
import { Definition, DefinitionLink, LocationLink, Location } from 'vscode-languageserver-types';
|
|
3
|
-
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams } from './protocol';
|
|
3
|
+
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
|
|
4
|
+
/**
|
|
5
|
+
* Since 3.6.0
|
|
6
|
+
*/
|
|
4
7
|
export interface TypeDefinitionClientCapabilities {
|
|
5
8
|
/**
|
|
6
|
-
*
|
|
9
|
+
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
10
|
+
* the client supports the new `TypeDefinitionRegistrationOptions` return value
|
|
11
|
+
* for the corresponding server capability as well.
|
|
7
12
|
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Capabilities specific to the `textDocument/typeDefinition`
|
|
11
|
-
*/
|
|
12
|
-
typeDefinition?: {
|
|
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
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export interface TypeDefinitionServerCapabilities {
|
|
13
|
+
dynamicRegistration?: boolean;
|
|
27
14
|
/**
|
|
28
|
-
* The
|
|
15
|
+
* The client supports additional metadata in the form of definition links.
|
|
16
|
+
*
|
|
17
|
+
* Since 3.14.0
|
|
29
18
|
*/
|
|
30
|
-
|
|
19
|
+
linkSupport?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface TypeDefinitionOptions extends WorkDoneProgressOptions {
|
|
22
|
+
}
|
|
23
|
+
export interface TypeDefinitionRegistrationOptions extends TextDocumentRegistrationOptions, TypeDefinitionOptions, StaticRegistrationOptions {
|
|
24
|
+
}
|
|
25
|
+
export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
|
|
31
26
|
}
|
|
32
27
|
/**
|
|
33
28
|
* A request to resolve the type definition locations of a symbol at a given text
|
|
@@ -36,6 +31,7 @@ export interface TypeDefinitionServerCapabilities {
|
|
|
36
31
|
* Thenable that resolves to such.
|
|
37
32
|
*/
|
|
38
33
|
export declare namespace TypeDefinitionRequest {
|
|
39
|
-
const type: RequestType<
|
|
40
|
-
|
|
34
|
+
const type: RequestType<TypeDefinitionParams, Location | Location[] | LocationLink[] | null, void, TypeDefinitionRegistrationOptions>;
|
|
35
|
+
const resultType: ProgressType<Location[] | LocationLink[]>;
|
|
36
|
+
type HandlerSignature = RequestHandler<TypeDefinitionParams, Definition | DefinitionLink[] | null, void>;
|
|
41
37
|
}
|
|
@@ -16,4 +16,5 @@ let __noDynamicImport;
|
|
|
16
16
|
var TypeDefinitionRequest;
|
|
17
17
|
(function (TypeDefinitionRequest) {
|
|
18
18
|
TypeDefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/typeDefinition');
|
|
19
|
+
TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
|
|
19
20
|
})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
|
package/lib/utils/is.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export declare function array<T>(value: any): value is T[];
|
|
|
7
7
|
export declare function stringArray(value: any): value is string[];
|
|
8
8
|
export declare function typedArray<T>(value: any, check: (value: any) => boolean): value is T[];
|
|
9
9
|
export declare function thenable<T>(value: any): value is Thenable<T>;
|
|
10
|
+
export declare function objectLiteral(value: any): value is object;
|
package/lib/utils/is.js
CHANGED
|
@@ -40,3 +40,10 @@ function thenable(value) {
|
|
|
40
40
|
return value && func(value.then);
|
|
41
41
|
}
|
|
42
42
|
exports.thenable = thenable;
|
|
43
|
+
function objectLiteral(value) {
|
|
44
|
+
// Strictly speaking class instances pass this check as well. Since the LSP
|
|
45
|
+
// doesn't use classes we ignore this for now. If we do we need to add something
|
|
46
|
+
// like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
|
|
47
|
+
return value !== null && typeof value === 'object';
|
|
48
|
+
}
|
|
49
|
+
exports.objectLiteral = objectLiteral;
|
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.0-next.
|
|
4
|
+
"version": "3.15.0-next.9",
|
|
5
5
|
"author": "Microsoft Corporation",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
"main": "./lib/main.js",
|
|
16
16
|
"typings": "./lib/main",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"vscode-jsonrpc": "^
|
|
19
|
-
"vscode-languageserver-types": "3.15.0-next.
|
|
18
|
+
"vscode-jsonrpc": "^5.0.0-next.2",
|
|
19
|
+
"vscode-languageserver-types": "^3.15.0-next.5"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"prepublishOnly": "npm run clean && npm run compile && npm test",
|
|
23
23
|
"postpublish": "node ../build/npm/post-publish.js",
|
|
24
|
-
"compile": "node ../build/bin/tsc -
|
|
25
|
-
"watch": "node ../build/bin/tsc -
|
|
24
|
+
"compile": "node ../build/bin/tsc -b ./tsconfig.json",
|
|
25
|
+
"watch": "node ../build/bin/tsc -b ./tsconfig.json -w",
|
|
26
26
|
"test": "node ../node_modules/mocha/bin/_mocha",
|
|
27
27
|
"clean": "node ../node_modules/rimraf/bin.js lib",
|
|
28
28
|
"preversion": "npm test"
|