vscode-languageserver-protocol 3.13.0-next.2 → 3.14.1
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/main.d.ts +1 -0
- package/lib/protocol.configuration.d.ts +5 -0
- package/lib/protocol.configuration.js +5 -0
- package/lib/protocol.d.ts +37 -15
- package/lib/protocol.declaration.d.ts +42 -0
- package/lib/protocol.declaration.js +20 -0
- package/lib/protocol.foldingRange.d.ts +3 -3
- package/lib/protocol.foldingRange.js +1 -1
- package/lib/protocol.implementation.d.ts +7 -3
- package/lib/protocol.implementation.js +2 -0
- package/lib/protocol.js +10 -5
- package/lib/protocol.typeDefinition.d.ts +7 -3
- package/lib/protocol.typeDefinition.js +2 -0
- package/lib/utils/is.js +4 -5
- package/package.json +29 -29
package/lib/main.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource,
|
|
|
2
2
|
export { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport, };
|
|
3
3
|
export * from 'vscode-languageserver-types';
|
|
4
4
|
export * from './protocol';
|
|
5
|
+
export { FoldingRangeParams as FoldingRangeRequestParam } from './protocol';
|
|
5
6
|
export declare namespace Proposed {
|
|
6
7
|
}
|
|
7
8
|
export interface ProtocolConnection {
|
|
@@ -13,6 +13,11 @@ export interface ConfigurationClientCapabilities {
|
|
|
13
13
|
/**
|
|
14
14
|
* The 'workspace/configuration' request is sent from the server to the client to fetch a certain
|
|
15
15
|
* configuration setting.
|
|
16
|
+
*
|
|
17
|
+
* This pull model replaces the old push model were the client signaled configuration change via an
|
|
18
|
+
* event. If the server still needs to react to configuration changes (since the server caches the
|
|
19
|
+
* result of `workspace/configuration` requests) the server should register for an empty configuration
|
|
20
|
+
* change event and empty the cache if such an event is received.
|
|
16
21
|
*/
|
|
17
22
|
export declare namespace ConfigurationRequest {
|
|
18
23
|
const type: RequestType<ConfigurationParams, any[], void, void>;
|
|
@@ -8,6 +8,11 @@ const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
|
8
8
|
/**
|
|
9
9
|
* The 'workspace/configuration' request is sent from the server to the client to fetch a certain
|
|
10
10
|
* configuration setting.
|
|
11
|
+
*
|
|
12
|
+
* This pull model replaces the old push model were the client signaled configuration change via an
|
|
13
|
+
* event. If the server still needs to react to configuration changes (since the server caches the
|
|
14
|
+
* result of `workspace/configuration` requests) the server should register for an empty configuration
|
|
15
|
+
* change event and empty the cache if such an event is received.
|
|
11
16
|
*/
|
|
12
17
|
var ConfigurationRequest;
|
|
13
18
|
(function (ConfigurationRequest) {
|
package/lib/protocol.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { RequestType, RequestType0, NotificationType, NotificationType0 } from 'vscode-jsonrpc';
|
|
2
|
-
import { TextDocumentContentChangeEvent, Position, Range, Location, Diagnostic, Command, TextEdit, WorkspaceEdit, WorkspaceSymbolParams, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, TextDocumentSaveReason, CompletionItem, CompletionList, Hover, SignatureHelp,
|
|
2
|
+
import { TextDocumentContentChangeEvent, Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, WorkspaceSymbolParams, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, TextDocumentSaveReason, CompletionItem, CompletionList, Hover, SignatureHelp, ReferenceContext, DocumentHighlight, DocumentSymbolParams, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol } from 'vscode-languageserver-types';
|
|
3
3
|
import { ImplementationRequest, ImplementationClientCapabilities, ImplementationServerCapabilities } from './protocol.implementation';
|
|
4
4
|
import { TypeDefinitionRequest, TypeDefinitionClientCapabilities, TypeDefinitionServerCapabilities } from './protocol.typeDefinition';
|
|
5
5
|
import { WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, WorkspaceFoldersInitializeParams, WorkspaceFoldersClientCapabilities, WorkspaceFoldersServerCapabilities } from './protocol.workspaceFolders';
|
|
6
6
|
import { ConfigurationRequest, ConfigurationParams, ConfigurationItem, ConfigurationClientCapabilities } from './protocol.configuration';
|
|
7
7
|
import { DocumentColorRequest, ColorPresentationRequest, ColorProviderOptions, DocumentColorParams, ColorPresentationParams, ColorServerCapabilities, ColorClientCapabilities } from './protocol.colorProvider';
|
|
8
|
-
import { FoldingRangeClientCapabilities, FoldingRangeProviderOptions, FoldingRangeRequest,
|
|
8
|
+
import { FoldingRangeClientCapabilities, FoldingRangeProviderOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeServerCapabilities } from './protocol.foldingRange';
|
|
9
|
+
import { DeclarationClientCapabilities, DeclarationRequest, DeclarationServerCapabilities } from './protocol.declaration';
|
|
9
10
|
/**
|
|
10
11
|
* A document filter denotes a document by different properties like
|
|
11
12
|
* the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of
|
|
@@ -117,15 +118,15 @@ export interface TextDocumentPositionParams {
|
|
|
117
118
|
export declare type ResourceOperationKind = 'create' | 'rename' | 'delete';
|
|
118
119
|
export declare namespace ResourceOperationKind {
|
|
119
120
|
/**
|
|
120
|
-
* Supports creating new
|
|
121
|
+
* Supports creating new files and folders.
|
|
121
122
|
*/
|
|
122
123
|
const Create: ResourceOperationKind;
|
|
123
124
|
/**
|
|
124
|
-
* Supports renaming existing
|
|
125
|
+
* Supports renaming existing files and folders.
|
|
125
126
|
*/
|
|
126
127
|
const Rename: ResourceOperationKind;
|
|
127
128
|
/**
|
|
128
|
-
* Supports deleting existing
|
|
129
|
+
* Supports deleting existing files and folders.
|
|
129
130
|
*/
|
|
130
131
|
const Delete: ResourceOperationKind;
|
|
131
132
|
}
|
|
@@ -173,7 +174,7 @@ export interface WorkspaceClientCapabilities {
|
|
|
173
174
|
documentChanges?: boolean;
|
|
174
175
|
/**
|
|
175
176
|
* The resource operations the client supports. Clients should at least
|
|
176
|
-
* support 'create', 'rename' and 'delete'.
|
|
177
|
+
* support 'create', 'rename' and 'delete' files and folders.
|
|
177
178
|
*/
|
|
178
179
|
resourceOperations?: ResourceOperationKind[];
|
|
179
180
|
/**
|
|
@@ -353,6 +354,16 @@ export interface TextDocumentClientCapabilities {
|
|
|
353
354
|
* property. The order describes the preferred format of the client.
|
|
354
355
|
*/
|
|
355
356
|
documentationFormat?: MarkupKind[];
|
|
357
|
+
/**
|
|
358
|
+
* Client capabilities specific to parameter information.
|
|
359
|
+
*/
|
|
360
|
+
parameterInformation?: {
|
|
361
|
+
/**
|
|
362
|
+
* The client supports processing label offsets instead of a
|
|
363
|
+
* simple label string.
|
|
364
|
+
*/
|
|
365
|
+
labelOffsetSupport?: boolean;
|
|
366
|
+
};
|
|
356
367
|
};
|
|
357
368
|
};
|
|
358
369
|
/**
|
|
@@ -437,6 +448,10 @@ export interface TextDocumentClientCapabilities {
|
|
|
437
448
|
* Whether definition supports dynamic registration.
|
|
438
449
|
*/
|
|
439
450
|
dynamicRegistration?: boolean;
|
|
451
|
+
/**
|
|
452
|
+
* The client supports additional metadata in the form of definition links.
|
|
453
|
+
*/
|
|
454
|
+
linkSupport?: boolean;
|
|
440
455
|
};
|
|
441
456
|
/**
|
|
442
457
|
* Capabilities specific to the `textDocument/codeAction`
|
|
@@ -525,7 +540,7 @@ export interface _ClientCapabilities {
|
|
|
525
540
|
*/
|
|
526
541
|
experimental?: any;
|
|
527
542
|
}
|
|
528
|
-
export declare type ClientCapabilities = _ClientCapabilities & ImplementationClientCapabilities & TypeDefinitionClientCapabilities & WorkspaceFoldersClientCapabilities & ConfigurationClientCapabilities & ColorClientCapabilities & FoldingRangeClientCapabilities;
|
|
543
|
+
export declare type ClientCapabilities = _ClientCapabilities & ImplementationClientCapabilities & TypeDefinitionClientCapabilities & WorkspaceFoldersClientCapabilities & ConfigurationClientCapabilities & ColorClientCapabilities & FoldingRangeClientCapabilities & DeclarationClientCapabilities;
|
|
529
544
|
/**
|
|
530
545
|
* Defines how the host (editor) should sync
|
|
531
546
|
* document changes to the language server.
|
|
@@ -785,7 +800,7 @@ export interface _ServerCapabilities {
|
|
|
785
800
|
*/
|
|
786
801
|
experimental?: any;
|
|
787
802
|
}
|
|
788
|
-
export declare type ServerCapabilities = _ServerCapabilities & ImplementationServerCapabilities & TypeDefinitionServerCapabilities & WorkspaceFoldersServerCapabilities & ColorServerCapabilities & FoldingRangeServerCapabilities;
|
|
803
|
+
export declare type ServerCapabilities = _ServerCapabilities & ImplementationServerCapabilities & TypeDefinitionServerCapabilities & WorkspaceFoldersServerCapabilities & ColorServerCapabilities & FoldingRangeServerCapabilities & DeclarationServerCapabilities;
|
|
789
804
|
/**
|
|
790
805
|
* The initialize request is sent from the client to the server.
|
|
791
806
|
* It is sent once as the request after starting up the server.
|
|
@@ -804,7 +819,7 @@ export interface _InitializeParams {
|
|
|
804
819
|
* The process Id of the parent process that started
|
|
805
820
|
* the server.
|
|
806
821
|
*/
|
|
807
|
-
processId: number;
|
|
822
|
+
processId: number | null;
|
|
808
823
|
/**
|
|
809
824
|
* The rootPath of the workspace. Is null
|
|
810
825
|
* if no folder is open.
|
|
@@ -1048,7 +1063,7 @@ export interface DidChangeTextDocumentParams {
|
|
|
1048
1063
|
/**
|
|
1049
1064
|
* The actual content changes. The content changes describe single state changes
|
|
1050
1065
|
* to the document. So if there are two content changes c1 and c2 for a document
|
|
1051
|
-
* in state
|
|
1066
|
+
* in state S then c1 move the document to S' and c2 to S''.
|
|
1052
1067
|
*/
|
|
1053
1068
|
contentChanges: TextDocumentContentChangeEvent[];
|
|
1054
1069
|
}
|
|
@@ -1204,7 +1219,13 @@ export interface DidChangeWatchedFilesRegistrationOptions {
|
|
|
1204
1219
|
}
|
|
1205
1220
|
export interface FileSystemWatcher {
|
|
1206
1221
|
/**
|
|
1207
|
-
* The glob pattern to watch
|
|
1222
|
+
* The glob pattern to watch. Glob patterns can have the following syntax:
|
|
1223
|
+
* - `*` to match one or more characters in a path segment
|
|
1224
|
+
* - `?` to match on one character in a path segment
|
|
1225
|
+
* - `**` to match any number of path segments, including none
|
|
1226
|
+
* - `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
|
|
1227
|
+
* - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
|
|
1228
|
+
* - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
|
|
1208
1229
|
*/
|
|
1209
1230
|
globPattern: string;
|
|
1210
1231
|
/**
|
|
@@ -1338,11 +1359,12 @@ export declare namespace SignatureHelpRequest {
|
|
|
1338
1359
|
/**
|
|
1339
1360
|
* A request to resolve the definition location of a symbol at a given text
|
|
1340
1361
|
* document position. The request's parameter is of type [TextDocumentPosition]
|
|
1341
|
-
* (#TextDocumentPosition) the response is of type [Definition](#Definition)
|
|
1342
|
-
* Thenable that resolves
|
|
1362
|
+
* (#TextDocumentPosition) the response is of either type [Definition](#Definition)
|
|
1363
|
+
* or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
|
|
1364
|
+
* to such.
|
|
1343
1365
|
*/
|
|
1344
1366
|
export declare namespace DefinitionRequest {
|
|
1345
|
-
const type: RequestType<TextDocumentPositionParams,
|
|
1367
|
+
const type: RequestType<TextDocumentPositionParams, Location | Location[] | LocationLink[] | null, void, TextDocumentRegistrationOptions>;
|
|
1346
1368
|
}
|
|
1347
1369
|
/**
|
|
1348
1370
|
* Parameters for a [ReferencesRequest](#ReferencesRequest).
|
|
@@ -1621,4 +1643,4 @@ export interface ApplyWorkspaceEditResponse {
|
|
|
1621
1643
|
export declare namespace ApplyWorkspaceEditRequest {
|
|
1622
1644
|
const type: RequestType<ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, void, void>;
|
|
1623
1645
|
}
|
|
1624
|
-
export { ImplementationRequest, TypeDefinitionRequest, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, ColorProviderOptions, DocumentColorParams, ColorPresentationParams, FoldingRangeClientCapabilities, FoldingRangeProviderOptions, FoldingRangeRequest,
|
|
1646
|
+
export { ImplementationRequest, TypeDefinitionRequest, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, ColorProviderOptions, DocumentColorParams, ColorPresentationParams, FoldingRangeClientCapabilities, FoldingRangeProviderOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeServerCapabilities, DeclarationClientCapabilities, DeclarationRequest, DeclarationServerCapabilities };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { RequestType, RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
+
import { Declaration, DeclarationLink, Location, LocationLink } from 'vscode-languageserver-types';
|
|
3
|
+
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams } from './protocol';
|
|
4
|
+
export interface DeclarationClientCapabilities {
|
|
5
|
+
/**
|
|
6
|
+
* The text document client capabilities
|
|
7
|
+
*/
|
|
8
|
+
textDocument?: {
|
|
9
|
+
/**
|
|
10
|
+
* Capabilities specific to the `textDocument/declaration`
|
|
11
|
+
*/
|
|
12
|
+
declaration?: {
|
|
13
|
+
/**
|
|
14
|
+
* Whether declaration supports dynamic registration. If this is set to `true`
|
|
15
|
+
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
|
|
16
|
+
* return value for the corresponding server capability as well.
|
|
17
|
+
*/
|
|
18
|
+
dynamicRegistration?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The client supports additional metadata in the form of declaration links.
|
|
21
|
+
*/
|
|
22
|
+
linkSupport?: boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface DeclarationServerCapabilities {
|
|
27
|
+
/**
|
|
28
|
+
* The server provides Goto Type Definition support.
|
|
29
|
+
*/
|
|
30
|
+
declarationProvider?: boolean | (TextDocumentRegistrationOptions & StaticRegistrationOptions);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A request to resolve the type definition locations of a symbol at a given text
|
|
34
|
+
* document position. The request's parameter is of type [TextDocumentPositioParams]
|
|
35
|
+
* (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
|
|
36
|
+
* or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
|
|
37
|
+
* to such.
|
|
38
|
+
*/
|
|
39
|
+
export declare namespace DeclarationRequest {
|
|
40
|
+
const type: RequestType<TextDocumentPositionParams, Location | Location[] | LocationLink[] | null, void, TextDocumentRegistrationOptions>;
|
|
41
|
+
type HandlerSignature = RequestHandler<TextDocumentPositionParams, Declaration | DeclarationLink[] | null, void>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* --------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
* ------------------------------------------------------------------------------------------ */
|
|
5
|
+
'use strict';
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
8
|
+
// @ts-ignore: to avoid inlining LocatioLink as dynamic import
|
|
9
|
+
let __noDynamicImport;
|
|
10
|
+
/**
|
|
11
|
+
* A request to resolve the type definition locations of a symbol at a given text
|
|
12
|
+
* document position. The request's parameter is of type [TextDocumentPositioParams]
|
|
13
|
+
* (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
|
|
14
|
+
* or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
|
|
15
|
+
* to such.
|
|
16
|
+
*/
|
|
17
|
+
var DeclarationRequest;
|
|
18
|
+
(function (DeclarationRequest) {
|
|
19
|
+
DeclarationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/declaration');
|
|
20
|
+
})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
|
|
@@ -84,7 +84,7 @@ export interface FoldingRange {
|
|
|
84
84
|
/**
|
|
85
85
|
* Parameters for a [FoldingRangeRequest](#FoldingRangeRequest).
|
|
86
86
|
*/
|
|
87
|
-
export interface
|
|
87
|
+
export interface FoldingRangeParams {
|
|
88
88
|
/**
|
|
89
89
|
* The text document.
|
|
90
90
|
*/
|
|
@@ -92,10 +92,10 @@ export interface FoldingRangeRequestParam {
|
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
* A request to provide folding ranges in a document. The request's
|
|
95
|
-
* parameter is of type [
|
|
95
|
+
* parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
|
|
96
96
|
* response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
|
|
97
97
|
* that resolves to such.
|
|
98
98
|
*/
|
|
99
99
|
export declare namespace FoldingRangeRequest {
|
|
100
|
-
const type: RequestType<
|
|
100
|
+
const type: RequestType<FoldingRangeParams, FoldingRange[] | null, any, any>;
|
|
101
101
|
}
|
|
@@ -25,7 +25,7 @@ var FoldingRangeKind;
|
|
|
25
25
|
})(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
|
|
26
26
|
/**
|
|
27
27
|
* A request to provide folding ranges in a document. The request's
|
|
28
|
-
* parameter is of type [
|
|
28
|
+
* parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
|
|
29
29
|
* response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
|
|
30
30
|
* that resolves to such.
|
|
31
31
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestType, RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
-
import { Definition } from 'vscode-languageserver-types';
|
|
2
|
+
import { Definition, DefinitionLink, Location, LocationLink } from 'vscode-languageserver-types';
|
|
3
3
|
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams } from './protocol';
|
|
4
4
|
export interface ImplementationClientCapabilities {
|
|
5
5
|
/**
|
|
@@ -16,6 +16,10 @@ export interface ImplementationClientCapabilities {
|
|
|
16
16
|
* return value for the corresponding server capability as well.
|
|
17
17
|
*/
|
|
18
18
|
dynamicRegistration?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The client supports additional metadata in the form of definition links.
|
|
21
|
+
*/
|
|
22
|
+
linkSupport?: boolean;
|
|
19
23
|
};
|
|
20
24
|
};
|
|
21
25
|
}
|
|
@@ -32,6 +36,6 @@ export interface ImplementationServerCapabilities {
|
|
|
32
36
|
* Thenable that resolves to such.
|
|
33
37
|
*/
|
|
34
38
|
export declare namespace ImplementationRequest {
|
|
35
|
-
const type: RequestType<TextDocumentPositionParams,
|
|
36
|
-
type HandlerSignature = RequestHandler<TextDocumentPositionParams, Definition | null, void>;
|
|
39
|
+
const type: RequestType<TextDocumentPositionParams, Location | Location[] | LocationLink[] | null, void, TextDocumentRegistrationOptions>;
|
|
40
|
+
type HandlerSignature = RequestHandler<TextDocumentPositionParams, Definition | DefinitionLink[] | null, void>;
|
|
37
41
|
}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
'use strict';
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
8
|
+
// @ts-ignore: to avoid inlining LocatioLink as dynamic import
|
|
9
|
+
let __noDynamicImport;
|
|
8
10
|
/**
|
|
9
11
|
* A request to resolve the implementation locations of a symbol at a given text
|
|
10
12
|
* document position. The request's parameter is of type [TextDocumentPositioParams]
|
package/lib/protocol.js
CHANGED
|
@@ -20,6 +20,10 @@ exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
|
|
|
20
20
|
exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
|
|
21
21
|
const protocol_foldingRange_1 = require("./protocol.foldingRange");
|
|
22
22
|
exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
|
|
23
|
+
const protocol_declaration_1 = require("./protocol.declaration");
|
|
24
|
+
exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
|
|
25
|
+
// @ts-ignore: to avoid inlining LocatioLink as dynamic import
|
|
26
|
+
let __noDynamicImport;
|
|
23
27
|
var DocumentFilter;
|
|
24
28
|
(function (DocumentFilter) {
|
|
25
29
|
function is(value) {
|
|
@@ -47,15 +51,15 @@ var UnregistrationRequest;
|
|
|
47
51
|
var ResourceOperationKind;
|
|
48
52
|
(function (ResourceOperationKind) {
|
|
49
53
|
/**
|
|
50
|
-
* Supports creating new
|
|
54
|
+
* Supports creating new files and folders.
|
|
51
55
|
*/
|
|
52
56
|
ResourceOperationKind.Create = 'create';
|
|
53
57
|
/**
|
|
54
|
-
* Supports renaming existing
|
|
58
|
+
* Supports renaming existing files and folders.
|
|
55
59
|
*/
|
|
56
60
|
ResourceOperationKind.Rename = 'rename';
|
|
57
61
|
/**
|
|
58
|
-
* Supports deleting existing
|
|
62
|
+
* Supports deleting existing files and folders.
|
|
59
63
|
*/
|
|
60
64
|
ResourceOperationKind.Delete = 'delete';
|
|
61
65
|
})(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
|
|
@@ -399,8 +403,9 @@ var SignatureHelpRequest;
|
|
|
399
403
|
/**
|
|
400
404
|
* A request to resolve the definition location of a symbol at a given text
|
|
401
405
|
* document position. The request's parameter is of type [TextDocumentPosition]
|
|
402
|
-
* (#TextDocumentPosition) the response is of type [Definition](#Definition)
|
|
403
|
-
* Thenable that resolves
|
|
406
|
+
* (#TextDocumentPosition) the response is of either type [Definition](#Definition)
|
|
407
|
+
* or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
|
|
408
|
+
* to such.
|
|
404
409
|
*/
|
|
405
410
|
var DefinitionRequest;
|
|
406
411
|
(function (DefinitionRequest) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestType, RequestHandler } from 'vscode-jsonrpc';
|
|
2
|
-
import { Definition } from 'vscode-languageserver-types';
|
|
2
|
+
import { Definition, DefinitionLink, LocationLink, Location } from 'vscode-languageserver-types';
|
|
3
3
|
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams } from './protocol';
|
|
4
4
|
export interface TypeDefinitionClientCapabilities {
|
|
5
5
|
/**
|
|
@@ -16,6 +16,10 @@ export interface TypeDefinitionClientCapabilities {
|
|
|
16
16
|
* return value for the corresponding server capability as well.
|
|
17
17
|
*/
|
|
18
18
|
dynamicRegistration?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The client supports additional metadata in the form of definition links.
|
|
21
|
+
*/
|
|
22
|
+
linkSupport?: boolean;
|
|
19
23
|
};
|
|
20
24
|
};
|
|
21
25
|
}
|
|
@@ -32,6 +36,6 @@ export interface TypeDefinitionServerCapabilities {
|
|
|
32
36
|
* Thenable that resolves to such.
|
|
33
37
|
*/
|
|
34
38
|
export declare namespace TypeDefinitionRequest {
|
|
35
|
-
const type: RequestType<TextDocumentPositionParams,
|
|
36
|
-
type HandlerSignature = RequestHandler<TextDocumentPositionParams, Definition | null, void>;
|
|
39
|
+
const type: RequestType<TextDocumentPositionParams, Location | Location[] | LocationLink[] | null, void, TextDocumentRegistrationOptions>;
|
|
40
|
+
type HandlerSignature = RequestHandler<TextDocumentPositionParams, Definition | DefinitionLink[] | null, void>;
|
|
37
41
|
}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
'use strict';
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
8
|
+
// @ts-ignore: to avoid inlining LocatioLink as dynamic import
|
|
9
|
+
let __noDynamicImport;
|
|
8
10
|
/**
|
|
9
11
|
* A request to resolve the type definition locations of a symbol at a given text
|
|
10
12
|
* document position. The request's parameter is of type [TextDocumentPositioParams]
|
package/lib/utils/is.js
CHANGED
|
@@ -4,25 +4,24 @@
|
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
'use strict';
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const toString = Object.prototype.toString;
|
|
8
7
|
function boolean(value) {
|
|
9
8
|
return value === true || value === false;
|
|
10
9
|
}
|
|
11
10
|
exports.boolean = boolean;
|
|
12
11
|
function string(value) {
|
|
13
|
-
return
|
|
12
|
+
return typeof value === 'string' || value instanceof String;
|
|
14
13
|
}
|
|
15
14
|
exports.string = string;
|
|
16
15
|
function number(value) {
|
|
17
|
-
return
|
|
16
|
+
return typeof value === 'number' || value instanceof Number;
|
|
18
17
|
}
|
|
19
18
|
exports.number = number;
|
|
20
19
|
function error(value) {
|
|
21
|
-
return
|
|
20
|
+
return value instanceof Error;
|
|
22
21
|
}
|
|
23
22
|
exports.error = error;
|
|
24
23
|
function func(value) {
|
|
25
|
-
return
|
|
24
|
+
return typeof value === 'function';
|
|
26
25
|
}
|
|
27
26
|
exports.func = func;
|
|
28
27
|
function array(value) {
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vscode-languageserver-protocol",
|
|
3
|
-
"description": "VSCode Language Server Protocol implementation",
|
|
4
|
-
"version": "3.
|
|
5
|
-
"author": "Microsoft Corporation",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/Microsoft/vscode-languageserver-node.git"
|
|
10
|
-
},
|
|
11
|
-
"bugs": {
|
|
12
|
-
"url": "https://github.com/Microsoft/vscode-languageserver-node/issues"
|
|
13
|
-
},
|
|
14
|
-
"main": "./lib/main.js",
|
|
15
|
-
"typings": "./lib/main",
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"vscode-jsonrpc": "^
|
|
18
|
-
"vscode-languageserver-types": "
|
|
19
|
-
},
|
|
20
|
-
"scripts": {
|
|
21
|
-
"prepublishOnly": "npm run clean && npm run compile && npm test",
|
|
22
|
-
"postpublish": "node ../build/npm/post-publish.js",
|
|
23
|
-
"compile": "node ../build/bin/tsc -p ./tsconfig.json",
|
|
24
|
-
"watch": "node ../build/bin/tsc -w -p ./tsconfig.json",
|
|
25
|
-
"test": "node ../node_modules/mocha/bin/_mocha",
|
|
26
|
-
"clean": "node ../node_modules/rimraf/bin.js lib",
|
|
27
|
-
"preversion": "npm test"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vscode-languageserver-protocol",
|
|
3
|
+
"description": "VSCode Language Server Protocol implementation",
|
|
4
|
+
"version": "3.14.1",
|
|
5
|
+
"author": "Microsoft Corporation",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/Microsoft/vscode-languageserver-node.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/Microsoft/vscode-languageserver-node/issues"
|
|
13
|
+
},
|
|
14
|
+
"main": "./lib/main.js",
|
|
15
|
+
"typings": "./lib/main",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"vscode-jsonrpc": "^4.0.0",
|
|
18
|
+
"vscode-languageserver-types": "3.14.0"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"prepublishOnly": "npm run clean && npm run compile && npm test",
|
|
22
|
+
"postpublish": "node ../build/npm/post-publish.js",
|
|
23
|
+
"compile": "node ../build/bin/tsc -p ./tsconfig.json",
|
|
24
|
+
"watch": "node ../build/bin/tsc -w -p ./tsconfig.json",
|
|
25
|
+
"test": "node ../node_modules/mocha/bin/_mocha",
|
|
26
|
+
"clean": "node ../node_modules/rimraf/bin.js lib",
|
|
27
|
+
"preversion": "npm test"
|
|
28
|
+
}
|
|
29
|
+
}
|