vscode-languageserver-protocol 3.17.5 → 3.17.6-next.10
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/README.md +1 -1
- package/lib/common/api.d.ts +1 -1
- package/lib/common/api.js +1 -1
- package/lib/common/messages.js +30 -0
- package/lib/common/protocol.d.ts +652 -341
- package/lib/common/protocol.diagnostic.d.ts +2 -2
- package/lib/common/protocol.diagnostic.js +24 -1
- package/lib/common/protocol.foldingRange.d.ts +28 -20
- package/lib/common/protocol.inlayHint.d.ts +10 -6
- package/lib/common/protocol.js +53 -8
- package/lib/common/protocol.notebook.d.ts +91 -63
- package/lib/common/protocol.notebook.js +24 -1
- package/lib/common/protocol.semanticTokens.d.ts +38 -24
- package/lib/common/protocol.showDocument.d.ts +2 -2
- package/lib/common/protocol.textDocumentContent.d.ts +100 -0
- package/lib/common/protocol.textDocumentContent.js +34 -0
- package/metaModel.schema.json +66 -2
- package/package.json +21 -12
- package/browser.d.ts +0 -6
- package/browser.js +0 -7
- package/node.cmd +0 -5
- package/node.d.ts +0 -6
- package/node.js +0 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { RequestHandler0, RequestHandler, ProgressType } from 'vscode-jsonrpc';
|
|
2
2
|
import { TextDocumentIdentifier, Diagnostic, DocumentUri, integer } from 'vscode-languageserver-types';
|
|
3
3
|
import { MessageDirection, ProtocolRequestType0, ProtocolRequestType } from './messages';
|
|
4
|
-
import type { PartialResultParams, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions } from './protocol';
|
|
4
|
+
import type { PartialResultParams, StaticRegistrationOptions, WorkDoneProgressParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions, DiagnosticsCapabilities } from './protocol';
|
|
5
5
|
/**
|
|
6
6
|
* Client capabilities specific to diagnostic pull requests.
|
|
7
7
|
*
|
|
8
8
|
* @since 3.17.0
|
|
9
9
|
*/
|
|
10
|
-
export type DiagnosticClientCapabilities = {
|
|
10
|
+
export type DiagnosticClientCapabilities = DiagnosticsCapabilities & {
|
|
11
11
|
/**
|
|
12
12
|
* Whether implementation supports dynamic registration. If this is set to `true`
|
|
13
13
|
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
|
|
@@ -3,10 +3,33 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
6
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
30
|
exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = void 0;
|
|
8
31
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
9
|
-
const Is = require("./utils/is");
|
|
32
|
+
const Is = __importStar(require("./utils/is"));
|
|
10
33
|
const messages_1 = require("./messages");
|
|
11
34
|
/**
|
|
12
35
|
* @since 3.17.0
|
|
@@ -2,6 +2,30 @@ import { RequestHandler, RequestHandler0 } from 'vscode-jsonrpc';
|
|
|
2
2
|
import { TextDocumentIdentifier, uinteger, FoldingRange, FoldingRangeKind } from 'vscode-languageserver-types';
|
|
3
3
|
import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './messages';
|
|
4
4
|
import type { TextDocumentRegistrationOptions, StaticRegistrationOptions, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* @since 3.18.0
|
|
7
|
+
*/
|
|
8
|
+
export type ClientFoldingRangeKindOptions = {
|
|
9
|
+
/**
|
|
10
|
+
* The folding range kind values the client supports. When this
|
|
11
|
+
* property exists the client also guarantees that it will
|
|
12
|
+
* handle values outside its set gracefully and falls back
|
|
13
|
+
* to a default value when unknown.
|
|
14
|
+
*/
|
|
15
|
+
valueSet?: FoldingRangeKind[];
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @since 3.18.0
|
|
19
|
+
*/
|
|
20
|
+
export type ClientFoldingRangeOptions = {
|
|
21
|
+
/**
|
|
22
|
+
* If set, the client signals that it supports setting collapsedText on
|
|
23
|
+
* folding ranges to display custom labels instead of the default text.
|
|
24
|
+
*
|
|
25
|
+
* @since 3.17.0
|
|
26
|
+
*/
|
|
27
|
+
collapsedText?: boolean;
|
|
28
|
+
};
|
|
5
29
|
export interface FoldingRangeClientCapabilities {
|
|
6
30
|
/**
|
|
7
31
|
* Whether implementation supports dynamic registration for folding range
|
|
@@ -27,29 +51,13 @@ export interface FoldingRangeClientCapabilities {
|
|
|
27
51
|
*
|
|
28
52
|
* @since 3.17.0
|
|
29
53
|
*/
|
|
30
|
-
foldingRangeKind?:
|
|
31
|
-
/**
|
|
32
|
-
* The folding range kind values the client supports. When this
|
|
33
|
-
* property exists the client also guarantees that it will
|
|
34
|
-
* handle values outside its set gracefully and falls back
|
|
35
|
-
* to a default value when unknown.
|
|
36
|
-
*/
|
|
37
|
-
valueSet?: FoldingRangeKind[];
|
|
38
|
-
};
|
|
54
|
+
foldingRangeKind?: ClientFoldingRangeKindOptions;
|
|
39
55
|
/**
|
|
40
56
|
* Specific options for the folding range.
|
|
41
57
|
*
|
|
42
58
|
* @since 3.17.0
|
|
43
59
|
*/
|
|
44
|
-
foldingRange?:
|
|
45
|
-
/**
|
|
46
|
-
* If set, the client signals that it supports setting collapsedText on
|
|
47
|
-
* folding ranges to display custom labels instead of the default text.
|
|
48
|
-
*
|
|
49
|
-
* @since 3.17.0
|
|
50
|
-
*/
|
|
51
|
-
collapsedText?: boolean;
|
|
52
|
-
};
|
|
60
|
+
foldingRange?: ClientFoldingRangeOptions;
|
|
53
61
|
}
|
|
54
62
|
/**
|
|
55
63
|
* Client workspace capabilities specific to folding ranges
|
|
@@ -57,7 +65,7 @@ export interface FoldingRangeClientCapabilities {
|
|
|
57
65
|
* @since 3.18.0
|
|
58
66
|
* @proposed
|
|
59
67
|
*/
|
|
60
|
-
export
|
|
68
|
+
export type FoldingRangeWorkspaceClientCapabilities = {
|
|
61
69
|
/**
|
|
62
70
|
* Whether the client implementation supports a refresh request sent from the
|
|
63
71
|
* server to the client.
|
|
@@ -71,7 +79,7 @@ export interface FoldingRangeWorkspaceClientCapabilities {
|
|
|
71
79
|
* @proposed
|
|
72
80
|
*/
|
|
73
81
|
refreshSupport?: boolean;
|
|
74
|
-
}
|
|
82
|
+
};
|
|
75
83
|
export interface FoldingRangeOptions extends WorkDoneProgressOptions {
|
|
76
84
|
}
|
|
77
85
|
export interface FoldingRangeRegistrationOptions extends TextDocumentRegistrationOptions, FoldingRangeOptions, StaticRegistrationOptions {
|
|
@@ -2,6 +2,15 @@ import { RequestHandler, RequestHandler0 } from 'vscode-jsonrpc';
|
|
|
2
2
|
import { Range, TextDocumentIdentifier, InlayHint } from 'vscode-languageserver-types';
|
|
3
3
|
import { MessageDirection, ProtocolRequestType, ProtocolRequestType0 } from './messages';
|
|
4
4
|
import type { StaticRegistrationOptions, TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams } from './protocol';
|
|
5
|
+
/**
|
|
6
|
+
* @since 3.18.0
|
|
7
|
+
*/
|
|
8
|
+
export type ClientInlayHintResolveOptions = {
|
|
9
|
+
/**
|
|
10
|
+
* The properties that a client can resolve lazily.
|
|
11
|
+
*/
|
|
12
|
+
properties: string[];
|
|
13
|
+
};
|
|
5
14
|
/**
|
|
6
15
|
* Inlay hint client capabilities.
|
|
7
16
|
*
|
|
@@ -16,12 +25,7 @@ export type InlayHintClientCapabilities = {
|
|
|
16
25
|
* Indicates which properties a client can resolve lazily on an inlay
|
|
17
26
|
* hint.
|
|
18
27
|
*/
|
|
19
|
-
resolveSupport?:
|
|
20
|
-
/**
|
|
21
|
-
* The properties that a client can resolve lazily.
|
|
22
|
-
*/
|
|
23
|
-
properties: string[];
|
|
24
|
-
};
|
|
28
|
+
resolveSupport?: ClientInlayHintResolveOptions;
|
|
25
29
|
};
|
|
26
30
|
/**
|
|
27
31
|
* Client workspace capabilities specific to inlay hints.
|
package/lib/common/protocol.js
CHANGED
|
@@ -3,13 +3,36 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
6
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.InlineCompletionRequest = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = void 0;
|
|
30
|
+
exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.GlobPattern = exports.RelativePattern = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeErrorCodes = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.PositionEncodingKind = exports.RegularExpressionEngineKind = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0;
|
|
31
|
+
exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangesFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = void 0;
|
|
32
|
+
exports.TextDocumentContentRefreshRequest = exports.TextDocumentContentRequest = exports.InlineCompletionRequest = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = exports.MonikerRequest = exports.MonikerKind = void 0;
|
|
10
33
|
const messages_1 = require("./messages");
|
|
11
34
|
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
|
|
12
|
-
const Is = require("./utils/is");
|
|
35
|
+
const Is = __importStar(require("./utils/is"));
|
|
13
36
|
const protocol_implementation_1 = require("./protocol.implementation");
|
|
14
37
|
Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } });
|
|
15
38
|
const protocol_typeDefinition_1 = require("./protocol.typeDefinition");
|
|
@@ -90,6 +113,9 @@ Object.defineProperty(exports, "DidSaveNotebookDocumentNotification", { enumerab
|
|
|
90
113
|
Object.defineProperty(exports, "DidCloseNotebookDocumentNotification", { enumerable: true, get: function () { return protocol_notebook_1.DidCloseNotebookDocumentNotification; } });
|
|
91
114
|
const protocol_inlineCompletion_1 = require("./protocol.inlineCompletion");
|
|
92
115
|
Object.defineProperty(exports, "InlineCompletionRequest", { enumerable: true, get: function () { return protocol_inlineCompletion_1.InlineCompletionRequest; } });
|
|
116
|
+
const protocol_textDocumentContent_1 = require("./protocol.textDocumentContent");
|
|
117
|
+
Object.defineProperty(exports, "TextDocumentContentRequest", { enumerable: true, get: function () { return protocol_textDocumentContent_1.TextDocumentContentRequest; } });
|
|
118
|
+
Object.defineProperty(exports, "TextDocumentContentRefreshRequest", { enumerable: true, get: function () { return protocol_textDocumentContent_1.TextDocumentContentRefreshRequest; } });
|
|
93
119
|
// @ts-ignore: to avoid inlining LocationLink as dynamic import
|
|
94
120
|
let __noDynamicImport;
|
|
95
121
|
/**
|
|
@@ -102,7 +128,7 @@ var TextDocumentFilter;
|
|
|
102
128
|
(function (TextDocumentFilter) {
|
|
103
129
|
function is(value) {
|
|
104
130
|
const candidate = value;
|
|
105
|
-
return Is.string(candidate) || (Is.string(candidate.language) || Is.string(candidate.scheme) ||
|
|
131
|
+
return Is.string(candidate) || (Is.string(candidate.language) || Is.string(candidate.scheme) || GlobPattern.is(candidate.pattern));
|
|
106
132
|
}
|
|
107
133
|
TextDocumentFilter.is = is;
|
|
108
134
|
})(TextDocumentFilter || (exports.TextDocumentFilter = TextDocumentFilter = {}));
|
|
@@ -146,7 +172,7 @@ var DocumentSelector;
|
|
|
146
172
|
if (!Array.isArray(value)) {
|
|
147
173
|
return false;
|
|
148
174
|
}
|
|
149
|
-
for (
|
|
175
|
+
for (const elem of value) {
|
|
150
176
|
if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) {
|
|
151
177
|
return false;
|
|
152
178
|
}
|
|
@@ -214,6 +240,16 @@ var FailureHandlingKind;
|
|
|
214
240
|
*/
|
|
215
241
|
FailureHandlingKind.Undo = 'undo';
|
|
216
242
|
})(FailureHandlingKind || (exports.FailureHandlingKind = FailureHandlingKind = {}));
|
|
243
|
+
/**
|
|
244
|
+
* Regular Expression Engines
|
|
245
|
+
*
|
|
246
|
+
* @since 3.18.0
|
|
247
|
+
* @proposed
|
|
248
|
+
*/
|
|
249
|
+
var RegularExpressionEngineKind;
|
|
250
|
+
(function (RegularExpressionEngineKind) {
|
|
251
|
+
RegularExpressionEngineKind.ES2020 = 'ES2020';
|
|
252
|
+
})(RegularExpressionEngineKind || (exports.RegularExpressionEngineKind = RegularExpressionEngineKind = {}));
|
|
217
253
|
/**
|
|
218
254
|
* A set of predefined position encoding kinds.
|
|
219
255
|
*
|
|
@@ -380,6 +416,7 @@ var MessageType;
|
|
|
380
416
|
* A debug message.
|
|
381
417
|
*
|
|
382
418
|
* @since 3.18.0
|
|
419
|
+
* @proposed
|
|
383
420
|
*/
|
|
384
421
|
MessageType.Debug = 5;
|
|
385
422
|
})(MessageType || (exports.MessageType = MessageType = {}));
|
|
@@ -468,7 +505,7 @@ var TextDocumentContentChangeEvent;
|
|
|
468
505
|
* Checks whether the information describes a delta event.
|
|
469
506
|
*/
|
|
470
507
|
function isIncremental(event) {
|
|
471
|
-
|
|
508
|
+
const candidate = event;
|
|
472
509
|
return candidate !== undefined && candidate !== null &&
|
|
473
510
|
typeof candidate.text === 'string' && candidate.range !== undefined &&
|
|
474
511
|
(candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
|
|
@@ -478,7 +515,7 @@ var TextDocumentContentChangeEvent;
|
|
|
478
515
|
* Checks whether the information describes a full replacement event.
|
|
479
516
|
*/
|
|
480
517
|
function isFull(event) {
|
|
481
|
-
|
|
518
|
+
const candidate = event;
|
|
482
519
|
return candidate !== undefined && candidate !== null &&
|
|
483
520
|
typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
|
|
484
521
|
}
|
|
@@ -598,6 +635,14 @@ var RelativePattern;
|
|
|
598
635
|
}
|
|
599
636
|
RelativePattern.is = is;
|
|
600
637
|
})(RelativePattern || (exports.RelativePattern = RelativePattern = {}));
|
|
638
|
+
var GlobPattern;
|
|
639
|
+
(function (GlobPattern) {
|
|
640
|
+
function is(value) {
|
|
641
|
+
const candidate = value;
|
|
642
|
+
return Is.string(candidate) || RelativePattern.is(candidate);
|
|
643
|
+
}
|
|
644
|
+
GlobPattern.is = is;
|
|
645
|
+
})(GlobPattern || (exports.GlobPattern = GlobPattern = {}));
|
|
601
646
|
var WatchKind;
|
|
602
647
|
(function (WatchKind) {
|
|
603
648
|
/**
|
|
@@ -151,6 +151,42 @@ export type VersionedNotebookDocumentIdentifier = {
|
|
|
151
151
|
*/
|
|
152
152
|
uri: URI;
|
|
153
153
|
};
|
|
154
|
+
/**
|
|
155
|
+
* @since 3.18.0
|
|
156
|
+
*/
|
|
157
|
+
export type NotebookCellLanguage = {
|
|
158
|
+
language: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* @since 3.18.0
|
|
162
|
+
*/
|
|
163
|
+
export type NotebookDocumentFilterWithNotebook = {
|
|
164
|
+
/**
|
|
165
|
+
* The notebook to be synced If a string
|
|
166
|
+
* value is provided it matches against the
|
|
167
|
+
* notebook type. '*' matches every notebook.
|
|
168
|
+
*/
|
|
169
|
+
notebook: string | NotebookDocumentFilter;
|
|
170
|
+
/**
|
|
171
|
+
* The cells of the matching notebook to be synced.
|
|
172
|
+
*/
|
|
173
|
+
cells?: NotebookCellLanguage[];
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* @since 3.18.0
|
|
177
|
+
*/
|
|
178
|
+
export type NotebookDocumentFilterWithCells = {
|
|
179
|
+
/**
|
|
180
|
+
* The notebook to be synced If a string
|
|
181
|
+
* value is provided it matches against the
|
|
182
|
+
* notebook type. '*' matches every notebook.
|
|
183
|
+
*/
|
|
184
|
+
notebook?: string | NotebookDocumentFilter;
|
|
185
|
+
/**
|
|
186
|
+
* The cells of the matching notebook to be synced.
|
|
187
|
+
*/
|
|
188
|
+
cells: NotebookCellLanguage[];
|
|
189
|
+
};
|
|
154
190
|
/**
|
|
155
191
|
* Options specific to a notebook plus its cells
|
|
156
192
|
* to be synced to the server.
|
|
@@ -170,33 +206,7 @@ export type NotebookDocumentSyncOptions = {
|
|
|
170
206
|
/**
|
|
171
207
|
* The notebooks to be synced
|
|
172
208
|
*/
|
|
173
|
-
notebookSelector: (
|
|
174
|
-
/**
|
|
175
|
-
* The notebook to be synced If a string
|
|
176
|
-
* value is provided it matches against the
|
|
177
|
-
* notebook type. '*' matches every notebook.
|
|
178
|
-
*/
|
|
179
|
-
notebook: string | NotebookDocumentFilter;
|
|
180
|
-
/**
|
|
181
|
-
* The cells of the matching notebook to be synced.
|
|
182
|
-
*/
|
|
183
|
-
cells?: {
|
|
184
|
-
language: string;
|
|
185
|
-
}[];
|
|
186
|
-
} | {
|
|
187
|
-
/**
|
|
188
|
-
* The notebook to be synced If a string
|
|
189
|
-
* value is provided it matches against the
|
|
190
|
-
* notebook type. '*' matches every notebook.
|
|
191
|
-
*/
|
|
192
|
-
notebook?: string | NotebookDocumentFilter;
|
|
193
|
-
/**
|
|
194
|
-
* The cells of the matching notebook to be synced.
|
|
195
|
-
*/
|
|
196
|
-
cells: {
|
|
197
|
-
language: string;
|
|
198
|
-
}[];
|
|
199
|
-
})[];
|
|
209
|
+
notebookSelector: (NotebookDocumentFilterWithNotebook | NotebookDocumentFilterWithCells)[];
|
|
200
210
|
/**
|
|
201
211
|
* Whether save notification should be forwarded to
|
|
202
212
|
* the server. Will only be honored if mode === `notebook`.
|
|
@@ -238,7 +248,7 @@ export type DidOpenNotebookDocumentParams = {
|
|
|
238
248
|
export declare namespace DidOpenNotebookDocumentNotification {
|
|
239
249
|
const method: 'notebookDocument/didOpen';
|
|
240
250
|
const messageDirection: MessageDirection;
|
|
241
|
-
const type: ProtocolNotificationType<DidOpenNotebookDocumentParams,
|
|
251
|
+
const type: ProtocolNotificationType<DidOpenNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
|
|
242
252
|
const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
|
|
243
253
|
}
|
|
244
254
|
/**
|
|
@@ -265,6 +275,55 @@ export declare namespace NotebookCellArrayChange {
|
|
|
265
275
|
function is(value: any): value is NotebookCellArrayChange;
|
|
266
276
|
function create(start: uinteger, deleteCount: uinteger, cells?: NotebookCell[]): NotebookCellArrayChange;
|
|
267
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* Structural changes to cells in a notebook document.
|
|
280
|
+
*
|
|
281
|
+
* @since 3.18.0
|
|
282
|
+
*/
|
|
283
|
+
export type NotebookDocumentCellChangeStructure = {
|
|
284
|
+
/**
|
|
285
|
+
* The change to the cell array.
|
|
286
|
+
*/
|
|
287
|
+
array: NotebookCellArrayChange;
|
|
288
|
+
/**
|
|
289
|
+
* Additional opened cell text documents.
|
|
290
|
+
*/
|
|
291
|
+
didOpen?: TextDocumentItem[];
|
|
292
|
+
/**
|
|
293
|
+
* Additional closed cell text documents.
|
|
294
|
+
*/
|
|
295
|
+
didClose?: TextDocumentIdentifier[];
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* Content changes to a cell in a notebook document.
|
|
299
|
+
*
|
|
300
|
+
* @since 3.18.0
|
|
301
|
+
*/
|
|
302
|
+
export type NotebookDocumentCellContentChanges = {
|
|
303
|
+
document: VersionedTextDocumentIdentifier;
|
|
304
|
+
changes: TextDocumentContentChangeEvent[];
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* Cell changes to a notebook document.
|
|
308
|
+
*
|
|
309
|
+
* @since 3.18.0
|
|
310
|
+
*/
|
|
311
|
+
export type NotebookDocumentCellChanges = {
|
|
312
|
+
/**
|
|
313
|
+
* Changes to the cell structure to add or
|
|
314
|
+
* remove cells.
|
|
315
|
+
*/
|
|
316
|
+
structure?: NotebookDocumentCellChangeStructure;
|
|
317
|
+
/**
|
|
318
|
+
* Changes to notebook cells properties like its
|
|
319
|
+
* kind, execution summary or metadata.
|
|
320
|
+
*/
|
|
321
|
+
data?: NotebookCell[];
|
|
322
|
+
/**
|
|
323
|
+
* Changes to the text content of notebook cells.
|
|
324
|
+
*/
|
|
325
|
+
textContent?: NotebookDocumentCellContentChanges[];
|
|
326
|
+
};
|
|
268
327
|
/**
|
|
269
328
|
* A change event for a notebook document.
|
|
270
329
|
*
|
|
@@ -280,38 +339,7 @@ export type NotebookDocumentChangeEvent = {
|
|
|
280
339
|
/**
|
|
281
340
|
* Changes to cells
|
|
282
341
|
*/
|
|
283
|
-
cells?:
|
|
284
|
-
/**
|
|
285
|
-
* Changes to the cell structure to add or
|
|
286
|
-
* remove cells.
|
|
287
|
-
*/
|
|
288
|
-
structure?: {
|
|
289
|
-
/**
|
|
290
|
-
* The change to the cell array.
|
|
291
|
-
*/
|
|
292
|
-
array: NotebookCellArrayChange;
|
|
293
|
-
/**
|
|
294
|
-
* Additional opened cell text documents.
|
|
295
|
-
*/
|
|
296
|
-
didOpen?: TextDocumentItem[];
|
|
297
|
-
/**
|
|
298
|
-
* Additional closed cell text documents.
|
|
299
|
-
*/
|
|
300
|
-
didClose?: TextDocumentIdentifier[];
|
|
301
|
-
};
|
|
302
|
-
/**
|
|
303
|
-
* Changes to notebook cells properties like its
|
|
304
|
-
* kind, execution summary or metadata.
|
|
305
|
-
*/
|
|
306
|
-
data?: NotebookCell[];
|
|
307
|
-
/**
|
|
308
|
-
* Changes to the text content of notebook cells.
|
|
309
|
-
*/
|
|
310
|
-
textContent?: {
|
|
311
|
-
document: VersionedTextDocumentIdentifier;
|
|
312
|
-
changes: TextDocumentContentChangeEvent[];
|
|
313
|
-
}[];
|
|
314
|
-
};
|
|
342
|
+
cells?: NotebookDocumentCellChanges;
|
|
315
343
|
};
|
|
316
344
|
/**
|
|
317
345
|
* The params sent in a change notebook document notification.
|
|
@@ -346,7 +374,7 @@ export type DidChangeNotebookDocumentParams = {
|
|
|
346
374
|
export declare namespace DidChangeNotebookDocumentNotification {
|
|
347
375
|
const method: 'notebookDocument/didChange';
|
|
348
376
|
const messageDirection: MessageDirection;
|
|
349
|
-
const type: ProtocolNotificationType<DidChangeNotebookDocumentParams,
|
|
377
|
+
const type: ProtocolNotificationType<DidChangeNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
|
|
350
378
|
const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
|
|
351
379
|
}
|
|
352
380
|
/**
|
|
@@ -368,7 +396,7 @@ export type DidSaveNotebookDocumentParams = {
|
|
|
368
396
|
export declare namespace DidSaveNotebookDocumentNotification {
|
|
369
397
|
const method: 'notebookDocument/didSave';
|
|
370
398
|
const messageDirection: MessageDirection;
|
|
371
|
-
const type: ProtocolNotificationType<DidSaveNotebookDocumentParams,
|
|
399
|
+
const type: ProtocolNotificationType<DidSaveNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
|
|
372
400
|
const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
|
|
373
401
|
}
|
|
374
402
|
/**
|
|
@@ -395,6 +423,6 @@ export type DidCloseNotebookDocumentParams = {
|
|
|
395
423
|
export declare namespace DidCloseNotebookDocumentNotification {
|
|
396
424
|
const method: 'notebookDocument/didClose';
|
|
397
425
|
const messageDirection: MessageDirection;
|
|
398
|
-
const type: ProtocolNotificationType<DidCloseNotebookDocumentParams,
|
|
426
|
+
const type: ProtocolNotificationType<DidCloseNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
|
|
399
427
|
const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
|
|
400
428
|
}
|
|
@@ -3,10 +3,33 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
6
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
30
|
exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = void 0;
|
|
8
31
|
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
|
|
9
|
-
const Is = require("./utils/is");
|
|
32
|
+
const Is = __importStar(require("./utils/is"));
|
|
10
33
|
const messages_1 = require("./messages");
|
|
11
34
|
/**
|
|
12
35
|
* A notebook cell kind.
|
|
@@ -18,6 +18,31 @@ export declare namespace TokenFormat {
|
|
|
18
18
|
const Relative: 'relative';
|
|
19
19
|
}
|
|
20
20
|
export type TokenFormat = 'relative';
|
|
21
|
+
/**
|
|
22
|
+
* @since 3.18.0
|
|
23
|
+
*/
|
|
24
|
+
export type ClientSemanticTokensRequestFullDelta = {
|
|
25
|
+
/**
|
|
26
|
+
* The client will send the `textDocument/semanticTokens/full/delta` request if
|
|
27
|
+
* the server provides a corresponding handler.
|
|
28
|
+
*/
|
|
29
|
+
delta?: boolean;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @since 3.18.0
|
|
33
|
+
*/
|
|
34
|
+
export type ClientSemanticTokensRequestOptions = {
|
|
35
|
+
/**
|
|
36
|
+
* The client will send the `textDocument/semanticTokens/range` request if
|
|
37
|
+
* the server provides a corresponding handler.
|
|
38
|
+
*/
|
|
39
|
+
range?: boolean | {};
|
|
40
|
+
/**
|
|
41
|
+
* The client will send the `textDocument/semanticTokens/full` request if
|
|
42
|
+
* the server provides a corresponding handler.
|
|
43
|
+
*/
|
|
44
|
+
full?: boolean | ClientSemanticTokensRequestFullDelta;
|
|
45
|
+
};
|
|
21
46
|
/**
|
|
22
47
|
* @since 3.16.0
|
|
23
48
|
*/
|
|
@@ -38,24 +63,7 @@ export interface SemanticTokensClientCapabilities {
|
|
|
38
63
|
* range provider the client might not render a minimap correctly or might
|
|
39
64
|
* even decide to not show any semantic tokens at all.
|
|
40
65
|
*/
|
|
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
|
-
};
|
|
66
|
+
requests: ClientSemanticTokensRequestOptions;
|
|
59
67
|
/**
|
|
60
68
|
* The token types that the client supports.
|
|
61
69
|
*/
|
|
@@ -99,6 +107,17 @@ export interface SemanticTokensClientCapabilities {
|
|
|
99
107
|
*/
|
|
100
108
|
augmentsSyntaxTokens?: boolean;
|
|
101
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Semantic tokens options to support deltas for full documents
|
|
112
|
+
*
|
|
113
|
+
* @since 3.18.0
|
|
114
|
+
*/
|
|
115
|
+
export type SemanticTokensFullDelta = {
|
|
116
|
+
/**
|
|
117
|
+
* The server supports deltas for full documents.
|
|
118
|
+
*/
|
|
119
|
+
delta?: boolean;
|
|
120
|
+
};
|
|
102
121
|
/**
|
|
103
122
|
* @since 3.16.0
|
|
104
123
|
*/
|
|
@@ -115,12 +134,7 @@ export interface SemanticTokensOptions extends WorkDoneProgressOptions {
|
|
|
115
134
|
/**
|
|
116
135
|
* Server supports providing semantic tokens for a full document.
|
|
117
136
|
*/
|
|
118
|
-
full?: boolean |
|
|
119
|
-
/**
|
|
120
|
-
* The server supports deltas for full documents.
|
|
121
|
-
*/
|
|
122
|
-
delta?: boolean;
|
|
123
|
-
};
|
|
137
|
+
full?: boolean | SemanticTokensFullDelta;
|
|
124
138
|
}
|
|
125
139
|
/**
|
|
126
140
|
* @since 3.16.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HandlerResult, RequestHandler } from 'vscode-jsonrpc';
|
|
1
|
+
import { CancellationToken, HandlerResult, RequestHandler } from 'vscode-jsonrpc';
|
|
2
2
|
import { Range, URI } from 'vscode-languageserver-types';
|
|
3
3
|
import { MessageDirection, ProtocolRequestType } from './messages';
|
|
4
4
|
/**
|
|
@@ -68,5 +68,5 @@ export declare namespace ShowDocumentRequest {
|
|
|
68
68
|
const messageDirection: MessageDirection;
|
|
69
69
|
const type: ProtocolRequestType<ShowDocumentParams, ShowDocumentResult, void, void, void>;
|
|
70
70
|
type HandlerSignature = RequestHandler<ShowDocumentParams, ShowDocumentResult, void>;
|
|
71
|
-
type MiddlewareSignature = (params: ShowDocumentParams, next: HandlerSignature) => HandlerResult<ShowDocumentResult, void>;
|
|
71
|
+
type MiddlewareSignature = (params: ShowDocumentParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<ShowDocumentResult, void>;
|
|
72
72
|
}
|