vscode-languageserver-protocol 3.16.0 → 3.17.0-next.12
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/browser/main.js +1 -1
- package/lib/common/api.d.ts +98 -0
- package/lib/common/api.js +56 -1
- package/lib/common/connection.d.ts +19 -19
- package/lib/common/connection.js +1 -1
- package/lib/common/messages.js +0 -3
- package/lib/common/proposed.diagnostic.d.ts +324 -0
- package/lib/common/proposed.diagnostic.js +72 -0
- package/lib/common/proposed.inlineValue.d.ts +86 -0
- package/lib/common/proposed.inlineValue.js +29 -0
- package/lib/common/proposed.notebooks.d.ts +254 -0
- package/lib/common/proposed.notebooks.js +105 -0
- package/lib/common/proposed.typeHierarchy.d.ts +83 -0
- package/lib/common/proposed.typeHierarchy.js +40 -0
- package/lib/common/protocol.callHierarchy.js +1 -1
- package/lib/common/protocol.configuration.d.ts +4 -3
- package/lib/common/protocol.d.ts +250 -23
- package/lib/common/protocol.declaration.d.ts +1 -1
- package/lib/common/protocol.fileOperations.d.ts +1 -1
- package/lib/common/protocol.implementation.d.ts +1 -1
- package/lib/common/protocol.js +56 -13
- package/lib/common/protocol.semanticTokens.d.ts +27 -118
- package/lib/common/protocol.semanticTokens.js +1 -69
- package/lib/common/protocol.typeDefinition.d.ts +1 -1
- package/lib/node/main.js +1 -1
- package/package.json +4 -3
|
@@ -1,129 +1,13 @@
|
|
|
1
|
-
import { TextDocumentIdentifier, Range, uinteger } from 'vscode-languageserver-types';
|
|
1
|
+
import { TextDocumentIdentifier, Range, uinteger, SemanticTokensEdit, SemanticTokensLegend, SemanticTokens, SemanticTokensDelta } from 'vscode-languageserver-types';
|
|
2
2
|
import { RequestHandler0, RequestHandler } from 'vscode-jsonrpc';
|
|
3
3
|
import { ProtocolRequestType, ProtocolRequestType0, RegistrationType } from './messages';
|
|
4
4
|
import { PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions, TextDocumentRegistrationOptions, StaticRegistrationOptions } from './protocol';
|
|
5
|
-
/**
|
|
6
|
-
* A set of predefined token types. This set is not fixed
|
|
7
|
-
* an clients can specify additional token types via the
|
|
8
|
-
* corresponding client capabilities.
|
|
9
|
-
*
|
|
10
|
-
* @since 3.16.0
|
|
11
|
-
*/
|
|
12
|
-
export declare enum SemanticTokenTypes {
|
|
13
|
-
namespace = "namespace",
|
|
14
|
-
/**
|
|
15
|
-
* Represents a generic type. Acts as a fallback for types which can't be mapped to
|
|
16
|
-
* a specific type like class or enum.
|
|
17
|
-
*/
|
|
18
|
-
type = "type",
|
|
19
|
-
class = "class",
|
|
20
|
-
enum = "enum",
|
|
21
|
-
interface = "interface",
|
|
22
|
-
struct = "struct",
|
|
23
|
-
typeParameter = "typeParameter",
|
|
24
|
-
parameter = "parameter",
|
|
25
|
-
variable = "variable",
|
|
26
|
-
property = "property",
|
|
27
|
-
enumMember = "enumMember",
|
|
28
|
-
event = "event",
|
|
29
|
-
function = "function",
|
|
30
|
-
method = "method",
|
|
31
|
-
macro = "macro",
|
|
32
|
-
keyword = "keyword",
|
|
33
|
-
modifier = "modifier",
|
|
34
|
-
comment = "comment",
|
|
35
|
-
string = "string",
|
|
36
|
-
number = "number",
|
|
37
|
-
regexp = "regexp",
|
|
38
|
-
operator = "operator"
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* A set of predefined token modifiers. This set is not fixed
|
|
42
|
-
* an clients can specify additional token types via the
|
|
43
|
-
* corresponding client capabilities.
|
|
44
|
-
*
|
|
45
|
-
* @since 3.16.0
|
|
46
|
-
*/
|
|
47
|
-
export declare enum SemanticTokenModifiers {
|
|
48
|
-
declaration = "declaration",
|
|
49
|
-
definition = "definition",
|
|
50
|
-
readonly = "readonly",
|
|
51
|
-
static = "static",
|
|
52
|
-
deprecated = "deprecated",
|
|
53
|
-
abstract = "abstract",
|
|
54
|
-
async = "async",
|
|
55
|
-
modification = "modification",
|
|
56
|
-
documentation = "documentation",
|
|
57
|
-
defaultLibrary = "defaultLibrary"
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* @since 3.16.0
|
|
61
|
-
*/
|
|
62
|
-
export interface SemanticTokensLegend {
|
|
63
|
-
/**
|
|
64
|
-
* The token types a server uses.
|
|
65
|
-
*/
|
|
66
|
-
tokenTypes: string[];
|
|
67
|
-
/**
|
|
68
|
-
* The token modifiers a server uses.
|
|
69
|
-
*/
|
|
70
|
-
tokenModifiers: string[];
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* @since 3.16.0
|
|
74
|
-
*/
|
|
75
|
-
export interface SemanticTokens {
|
|
76
|
-
/**
|
|
77
|
-
* An optional result id. If provided and clients support delta updating
|
|
78
|
-
* the client will include the result id in the next semantic token request.
|
|
79
|
-
* A server can then instead of computing all semantic tokens again simply
|
|
80
|
-
* send a delta.
|
|
81
|
-
*/
|
|
82
|
-
resultId?: string;
|
|
83
|
-
/**
|
|
84
|
-
* The actual tokens.
|
|
85
|
-
*/
|
|
86
|
-
data: uinteger[];
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* @since 3.16.0
|
|
90
|
-
*/
|
|
91
|
-
export declare namespace SemanticTokens {
|
|
92
|
-
function is(value: any): value is SemanticTokens;
|
|
93
|
-
}
|
|
94
5
|
/**
|
|
95
6
|
* @since 3.16.0
|
|
96
7
|
*/
|
|
97
8
|
export interface SemanticTokensPartialResult {
|
|
98
9
|
data: uinteger[];
|
|
99
10
|
}
|
|
100
|
-
/**
|
|
101
|
-
* @since 3.16.0
|
|
102
|
-
*/
|
|
103
|
-
export interface SemanticTokensEdit {
|
|
104
|
-
/**
|
|
105
|
-
* The start offset of the edit.
|
|
106
|
-
*/
|
|
107
|
-
start: uinteger;
|
|
108
|
-
/**
|
|
109
|
-
* The count of elements to remove.
|
|
110
|
-
*/
|
|
111
|
-
deleteCount: uinteger;
|
|
112
|
-
/**
|
|
113
|
-
* The elements to insert.
|
|
114
|
-
*/
|
|
115
|
-
data?: uinteger[];
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* @since 3.16.0
|
|
119
|
-
*/
|
|
120
|
-
export interface SemanticTokensDelta {
|
|
121
|
-
readonly resultId?: string;
|
|
122
|
-
/**
|
|
123
|
-
* The semantic token edits to transform a previous result into a new result.
|
|
124
|
-
*/
|
|
125
|
-
edits: SemanticTokensEdit[];
|
|
126
|
-
}
|
|
127
11
|
/**
|
|
128
12
|
* @since 3.16.0
|
|
129
13
|
*/
|
|
@@ -192,6 +76,28 @@ export interface SemanticTokensClientCapabilities {
|
|
|
192
76
|
* Whether the client supports tokens that can span multiple lines.
|
|
193
77
|
*/
|
|
194
78
|
multilineTokenSupport?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Whether the client allows the server to actively cancel a
|
|
81
|
+
* semantic token request, e.g. supports returning
|
|
82
|
+
* LSPErrorCodes.ServerCancelled. If a server does the client
|
|
83
|
+
* needs to retrigger the request.
|
|
84
|
+
*
|
|
85
|
+
* @since 3.17.0
|
|
86
|
+
*/
|
|
87
|
+
serverCancelSupport?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Whether the client uses semantic tokens to augment existing
|
|
90
|
+
* syntax tokens. If set to `true` client side created syntax
|
|
91
|
+
* tokens and semantic tokens are both used for colorization. If
|
|
92
|
+
* set to `false` the client only uses the returned semantic tokens
|
|
93
|
+
* for colorization.
|
|
94
|
+
*
|
|
95
|
+
* If the value is `undefined` then the client behavior is not
|
|
96
|
+
* specified.
|
|
97
|
+
*
|
|
98
|
+
* @since 3.17.0
|
|
99
|
+
*/
|
|
100
|
+
augmentsSyntaxTokens?: boolean;
|
|
195
101
|
}
|
|
196
102
|
/**
|
|
197
103
|
* @since 3.16.0
|
|
@@ -285,6 +191,9 @@ export declare namespace SemanticTokensRangeRequest {
|
|
|
285
191
|
const type: ProtocolRequestType<SemanticTokensRangeParams, SemanticTokens | null, SemanticTokensPartialResult, void, void>;
|
|
286
192
|
type HandlerSignature = RequestHandler<SemanticTokensRangeParams, SemanticTokens | null, void>;
|
|
287
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* @since 3.16.0
|
|
196
|
+
*/
|
|
288
197
|
export interface SemanticTokensWorkspaceClientCapabilities {
|
|
289
198
|
/**
|
|
290
199
|
* Whether the client implementation supports a refresh request sent from
|
|
@@ -292,7 +201,7 @@ export interface SemanticTokensWorkspaceClientCapabilities {
|
|
|
292
201
|
*
|
|
293
202
|
* Note that this event is global and will force the client to refresh all
|
|
294
203
|
* semantic tokens currently shown. It should be used with absolute care
|
|
295
|
-
* and is useful for situation where a server for example
|
|
204
|
+
* and is useful for situation where a server for example detects a project
|
|
296
205
|
* wide change that requires such a calculation.
|
|
297
206
|
*/
|
|
298
207
|
refreshSupport?: boolean;
|
|
@@ -4,76 +4,8 @@
|
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
* ------------------------------------------------------------------------------------------ */
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat =
|
|
7
|
+
exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat = void 0;
|
|
8
8
|
const messages_1 = require("./messages");
|
|
9
|
-
/**
|
|
10
|
-
* A set of predefined token types. This set is not fixed
|
|
11
|
-
* an clients can specify additional token types via the
|
|
12
|
-
* corresponding client capabilities.
|
|
13
|
-
*
|
|
14
|
-
* @since 3.16.0
|
|
15
|
-
*/
|
|
16
|
-
var SemanticTokenTypes;
|
|
17
|
-
(function (SemanticTokenTypes) {
|
|
18
|
-
SemanticTokenTypes["namespace"] = "namespace";
|
|
19
|
-
/**
|
|
20
|
-
* Represents a generic type. Acts as a fallback for types which can't be mapped to
|
|
21
|
-
* a specific type like class or enum.
|
|
22
|
-
*/
|
|
23
|
-
SemanticTokenTypes["type"] = "type";
|
|
24
|
-
SemanticTokenTypes["class"] = "class";
|
|
25
|
-
SemanticTokenTypes["enum"] = "enum";
|
|
26
|
-
SemanticTokenTypes["interface"] = "interface";
|
|
27
|
-
SemanticTokenTypes["struct"] = "struct";
|
|
28
|
-
SemanticTokenTypes["typeParameter"] = "typeParameter";
|
|
29
|
-
SemanticTokenTypes["parameter"] = "parameter";
|
|
30
|
-
SemanticTokenTypes["variable"] = "variable";
|
|
31
|
-
SemanticTokenTypes["property"] = "property";
|
|
32
|
-
SemanticTokenTypes["enumMember"] = "enumMember";
|
|
33
|
-
SemanticTokenTypes["event"] = "event";
|
|
34
|
-
SemanticTokenTypes["function"] = "function";
|
|
35
|
-
SemanticTokenTypes["method"] = "method";
|
|
36
|
-
SemanticTokenTypes["macro"] = "macro";
|
|
37
|
-
SemanticTokenTypes["keyword"] = "keyword";
|
|
38
|
-
SemanticTokenTypes["modifier"] = "modifier";
|
|
39
|
-
SemanticTokenTypes["comment"] = "comment";
|
|
40
|
-
SemanticTokenTypes["string"] = "string";
|
|
41
|
-
SemanticTokenTypes["number"] = "number";
|
|
42
|
-
SemanticTokenTypes["regexp"] = "regexp";
|
|
43
|
-
SemanticTokenTypes["operator"] = "operator";
|
|
44
|
-
})(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
|
|
45
|
-
/**
|
|
46
|
-
* A set of predefined token modifiers. This set is not fixed
|
|
47
|
-
* an clients can specify additional token types via the
|
|
48
|
-
* corresponding client capabilities.
|
|
49
|
-
*
|
|
50
|
-
* @since 3.16.0
|
|
51
|
-
*/
|
|
52
|
-
var SemanticTokenModifiers;
|
|
53
|
-
(function (SemanticTokenModifiers) {
|
|
54
|
-
SemanticTokenModifiers["declaration"] = "declaration";
|
|
55
|
-
SemanticTokenModifiers["definition"] = "definition";
|
|
56
|
-
SemanticTokenModifiers["readonly"] = "readonly";
|
|
57
|
-
SemanticTokenModifiers["static"] = "static";
|
|
58
|
-
SemanticTokenModifiers["deprecated"] = "deprecated";
|
|
59
|
-
SemanticTokenModifiers["abstract"] = "abstract";
|
|
60
|
-
SemanticTokenModifiers["async"] = "async";
|
|
61
|
-
SemanticTokenModifiers["modification"] = "modification";
|
|
62
|
-
SemanticTokenModifiers["documentation"] = "documentation";
|
|
63
|
-
SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
|
|
64
|
-
})(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
|
|
65
|
-
/**
|
|
66
|
-
* @since 3.16.0
|
|
67
|
-
*/
|
|
68
|
-
var SemanticTokens;
|
|
69
|
-
(function (SemanticTokens) {
|
|
70
|
-
function is(value) {
|
|
71
|
-
const candidate = value;
|
|
72
|
-
return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
|
|
73
|
-
Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
|
|
74
|
-
}
|
|
75
|
-
SemanticTokens.is = is;
|
|
76
|
-
})(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
|
|
77
9
|
//------- 'textDocument/semanticTokens' -----
|
|
78
10
|
var TokenFormat;
|
|
79
11
|
(function (TokenFormat) {
|
|
@@ -33,6 +33,6 @@ export interface TypeDefinitionParams extends TextDocumentPositionParams, WorkDo
|
|
|
33
33
|
*/
|
|
34
34
|
export declare namespace TypeDefinitionRequest {
|
|
35
35
|
const method: 'textDocument/typeDefinition';
|
|
36
|
-
const type: ProtocolRequestType<TypeDefinitionParams,
|
|
36
|
+
const type: ProtocolRequestType<TypeDefinitionParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, TypeDefinitionRegistrationOptions>;
|
|
37
37
|
type HandlerSignature = RequestHandler<TypeDefinitionParams, Definition | DefinitionLink[] | null, void>;
|
|
38
38
|
}
|
package/lib/node/main.js
CHANGED
|
@@ -19,7 +19,7 @@ const node_1 = require("vscode-jsonrpc/node");
|
|
|
19
19
|
__exportStar(require("vscode-jsonrpc/node"), exports);
|
|
20
20
|
__exportStar(require("../common/api"), exports);
|
|
21
21
|
function createProtocolConnection(input, output, logger, options) {
|
|
22
|
-
return node_1.createMessageConnection(input, output, logger, options);
|
|
22
|
+
return (0, node_1.createMessageConnection)(input, output, logger, options);
|
|
23
23
|
}
|
|
24
24
|
exports.createProtocolConnection = createProtocolConnection;
|
|
25
25
|
//# sourceMappingURL=main.js.map
|
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.
|
|
4
|
+
"version": "3.17.0-next.12",
|
|
5
5
|
"author": "Microsoft Corporation",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"typings": "./lib/common/api.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode-jsonrpc": "
|
|
22
|
-
"vscode-languageserver-types": "3.
|
|
21
|
+
"vscode-jsonrpc": "8.0.0-next.5",
|
|
22
|
+
"vscode-languageserver-types": "3.17.0-next.6"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"prepublishOnly": "git clean -xfd . && npm install && npm run clean && npm run compile && npm test",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"compile": "node ../build/bin/tsc -b ./tsconfig.json",
|
|
29
29
|
"watch": "node ../build/bin/tsc -b ./tsconfig-watch.json -w",
|
|
30
30
|
"clean": "node ../node_modules/rimraf/bin.js lib && node ../node_modules/rimraf/bin.js dist",
|
|
31
|
+
"lint": "node ../node_modules/eslint/bin/eslint.js --ext ts src",
|
|
31
32
|
"test": "npm run test:node && npm run test:browser",
|
|
32
33
|
"test:node": "node ../node_modules/mocha/bin/_mocha",
|
|
33
34
|
"test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/protocol/src/browser/test/",
|