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,4 +1,5 @@
|
|
|
1
1
|
import { RequestHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc';
|
|
2
|
+
import { LSPAny } from 'vscode-languageserver-types';
|
|
2
3
|
import { ProtocolRequestType } from './messages';
|
|
3
4
|
import { PartialResultParams } from './protocol';
|
|
4
5
|
export interface ConfigurationClientCapabilities {
|
|
@@ -24,9 +25,9 @@ export interface ConfigurationClientCapabilities {
|
|
|
24
25
|
* change event and empty the cache if such an event is received.
|
|
25
26
|
*/
|
|
26
27
|
export declare namespace ConfigurationRequest {
|
|
27
|
-
const type: ProtocolRequestType<ConfigurationParams & PartialResultParams,
|
|
28
|
-
type HandlerSignature = RequestHandler<ConfigurationParams,
|
|
29
|
-
type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<
|
|
28
|
+
const type: ProtocolRequestType<ConfigurationParams & PartialResultParams, LSPAny[], never, void, void>;
|
|
29
|
+
type HandlerSignature = RequestHandler<ConfigurationParams, LSPAny[], void>;
|
|
30
|
+
type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<LSPAny[], void>;
|
|
30
31
|
}
|
|
31
32
|
export interface ConfigurationItem {
|
|
32
33
|
/**
|
package/lib/common/protocol.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProgressToken } from 'vscode-jsonrpc';
|
|
2
2
|
import { ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages';
|
|
3
|
-
import { Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, DocumentUri, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, CompletionItem, CompletionList, Hover, SignatureHelp, ReferenceContext, DocumentHighlight, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol, CompletionItemTag, DiagnosticTag, SymbolTag, uinteger, integer, InsertTextMode } from 'vscode-languageserver-types';
|
|
3
|
+
import { Position, Range, Location, LocationLink, Diagnostic, Command, TextEdit, WorkspaceEdit, DocumentUri, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, ReferenceContext, DocumentHighlight, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink, MarkupKind, SymbolKind, CompletionItemKind, CodeAction, CodeActionKind, DocumentSymbol, CompletionItemTag, DiagnosticTag, SymbolTag, uinteger, integer, InsertTextMode, LSPAny, WorkspaceSymbol } from 'vscode-languageserver-types';
|
|
4
4
|
import { ImplementationRequest, ImplementationClientCapabilities, ImplementationOptions, ImplementationRegistrationOptions, ImplementationParams } from './protocol.implementation';
|
|
5
5
|
import { TypeDefinitionRequest, TypeDefinitionClientCapabilities, TypeDefinitionOptions, TypeDefinitionRegistrationOptions, TypeDefinitionParams } from './protocol.typeDefinition';
|
|
6
6
|
import { WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, WorkspaceFoldersInitializeParams, WorkspaceFoldersClientCapabilities, WorkspaceFoldersServerCapabilities } from './protocol.workspaceFolders';
|
|
@@ -11,11 +11,13 @@ import { DeclarationClientCapabilities, DeclarationRequest, DeclarationOptions,
|
|
|
11
11
|
import { SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeRequest, SelectionRangeParams, SelectionRangeRegistrationOptions } from './protocol.selectionRange';
|
|
12
12
|
import { WorkDoneProgressClientCapabilities, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification } from './protocol.progress';
|
|
13
13
|
import { CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest } from './protocol.callHierarchy';
|
|
14
|
-
import {
|
|
14
|
+
import { SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensWorkspaceClientCapabilities, SemanticTokensRegistrationType } from './protocol.semanticTokens';
|
|
15
15
|
import { ShowDocumentParams, ShowDocumentResult, ShowDocumentRequest, ShowDocumentClientCapabilities } from './protocol.showDocument';
|
|
16
16
|
import { LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest } from './protocol.linkedEditingRange';
|
|
17
17
|
import { FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest } from './protocol.fileOperations';
|
|
18
18
|
import { UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest } from './protocol.moniker';
|
|
19
|
+
import { TypeHierarchyClientCapabilities, TypeHierarchyOptions, TypeHierarchyRegistrationOptions } from './proposed.typeHierarchy';
|
|
20
|
+
import { InlineValuesClientCapabilities, InlineValuesOptions, InlineValuesRegistrationOptions, InlineValuesWorkspaceClientCapabilities } from './proposed.inlineValue';
|
|
19
21
|
/**
|
|
20
22
|
* A document filter denotes a document by different properties like
|
|
21
23
|
* the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of
|
|
@@ -25,14 +27,16 @@ import { UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, Monik
|
|
|
25
27
|
* - `*` to match one or more characters in a path segment
|
|
26
28
|
* - `?` to match on one character in a path segment
|
|
27
29
|
* - `**` to match any number of path segments, including none
|
|
28
|
-
* - `{}` to group
|
|
30
|
+
* - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
|
|
29
31
|
* - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
|
|
30
32
|
* - `[!...]` 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`)
|
|
31
33
|
*
|
|
32
34
|
* @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
|
|
33
35
|
* @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
|
|
36
|
+
*
|
|
37
|
+
* @since 3.17.0 - proposed state.
|
|
34
38
|
*/
|
|
35
|
-
export declare type
|
|
39
|
+
export declare type TextDocumentFilter = {
|
|
36
40
|
/** A language id, like `typescript`. */
|
|
37
41
|
language: string;
|
|
38
42
|
/** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
|
|
@@ -55,12 +59,93 @@ export declare type DocumentFilter = {
|
|
|
55
59
|
pattern: string;
|
|
56
60
|
};
|
|
57
61
|
/**
|
|
58
|
-
* The
|
|
59
|
-
* [
|
|
62
|
+
* The TextDocumentFilter namespace provides helper functions to work with
|
|
63
|
+
* [TextDocumentFilter](#TextDocumentFilter) literals.
|
|
64
|
+
*
|
|
65
|
+
* @since 3.17.0 - proposed state.
|
|
60
66
|
*/
|
|
61
|
-
export declare namespace
|
|
62
|
-
function is(value: any): value is
|
|
67
|
+
export declare namespace TextDocumentFilter {
|
|
68
|
+
function is(value: any): value is TextDocumentFilter;
|
|
63
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* A notebook document filter denotes a notebook document by
|
|
72
|
+
* different properties.
|
|
73
|
+
*
|
|
74
|
+
* @since 3.17.0 - proposed state.
|
|
75
|
+
*/
|
|
76
|
+
export declare type NotebookDocumentFilter = {
|
|
77
|
+
/** The type of the enclosing notebook. */
|
|
78
|
+
notebookType: string;
|
|
79
|
+
/** A Uri [scheme](#Uri.scheme), like `file` or `untitled`.
|
|
80
|
+
* Will be matched against the URI of the notebook. */
|
|
81
|
+
scheme?: string;
|
|
82
|
+
/** A glob pattern, like `*.ipynb`.
|
|
83
|
+
* Will be matched against the notebooks` URI path section.*/
|
|
84
|
+
pattern?: string;
|
|
85
|
+
} | {
|
|
86
|
+
/** The type of the enclosing notebook. */
|
|
87
|
+
notebookType?: string;
|
|
88
|
+
/** A Uri [scheme](#Uri.scheme), like `file` or `untitled`.
|
|
89
|
+
* Will be matched against the URI of the notebook. */
|
|
90
|
+
scheme: string;
|
|
91
|
+
/** A glob pattern, like `*.ipynb`.
|
|
92
|
+
* Will be matched against the notebooks` URI path section.*/
|
|
93
|
+
pattern?: string;
|
|
94
|
+
} | {
|
|
95
|
+
/** The type of the enclosing notebook. */
|
|
96
|
+
notebookType?: string;
|
|
97
|
+
/** A Uri [scheme](#Uri.scheme), like `file` or `untitled`.
|
|
98
|
+
* Will be matched against the URI of the notebook. */
|
|
99
|
+
scheme?: string;
|
|
100
|
+
/** A glob pattern, like `*.ipynb`.
|
|
101
|
+
* Will be matched against the notebooks` URI path section.*/
|
|
102
|
+
pattern: string;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* The NotebookDocumentFilter namespace provides helper functions to work with
|
|
106
|
+
* [NotebookDocumentFilter](#NotebookDocumentFilter) literals.
|
|
107
|
+
*
|
|
108
|
+
* @since 3.17.0 - proposed state.
|
|
109
|
+
*/
|
|
110
|
+
export declare namespace NotebookDocumentFilter {
|
|
111
|
+
function is(value: any): value is NotebookDocumentFilter;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* A notebook cell text document filter denotes a cell text
|
|
115
|
+
* document by different properties.
|
|
116
|
+
*
|
|
117
|
+
* @since 3.17.0 - proposed state.
|
|
118
|
+
*/
|
|
119
|
+
export declare type NotebookCellTextDocumentFilter = {
|
|
120
|
+
/**
|
|
121
|
+
* A filter that matches against the notebook
|
|
122
|
+
* containing the notebook cell.
|
|
123
|
+
*/
|
|
124
|
+
notebookDocument: NotebookDocumentFilter;
|
|
125
|
+
/**
|
|
126
|
+
* A language id like `python`.
|
|
127
|
+
*
|
|
128
|
+
* Will be matched against the language id of the
|
|
129
|
+
* notebook cell document.
|
|
130
|
+
*/
|
|
131
|
+
cellLanguage?: string;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* The NotebookCellTextDocumentFilter namespace provides helper functions to work with
|
|
135
|
+
* [NotebookCellTextDocumentFilter](#NotebookCellTextDocumentFilter) literals.
|
|
136
|
+
*
|
|
137
|
+
* @since 3.17.0 - proposed state.
|
|
138
|
+
*/
|
|
139
|
+
export declare namespace NotebookCellTextDocumentFilter {
|
|
140
|
+
function is(value: any): value is NotebookCellTextDocumentFilter;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* A document filter describes a top level text document or
|
|
144
|
+
* a notebook cell document.
|
|
145
|
+
*
|
|
146
|
+
* @since 3.17.0 - proposed support for NotebookCellTextDocumentFilter.
|
|
147
|
+
*/
|
|
148
|
+
export declare type DocumentFilter = TextDocumentFilter | NotebookCellTextDocumentFilter;
|
|
64
149
|
/**
|
|
65
150
|
* A document selector is the combination of one or many document filters.
|
|
66
151
|
*
|
|
@@ -92,7 +177,7 @@ export interface Registration {
|
|
|
92
177
|
/**
|
|
93
178
|
* Options necessary for the registration.
|
|
94
179
|
*/
|
|
95
|
-
registerOptions?:
|
|
180
|
+
registerOptions?: LSPAny;
|
|
96
181
|
}
|
|
97
182
|
export interface RegistrationParams {
|
|
98
183
|
registrations: Registration[];
|
|
@@ -247,6 +332,13 @@ export interface WorkspaceClientCapabilities {
|
|
|
247
332
|
* Since 3.16.0
|
|
248
333
|
*/
|
|
249
334
|
fileOperations?: FileOperationClientCapabilities;
|
|
335
|
+
/**
|
|
336
|
+
* Capabilities specific to the inline values requests scoped to the
|
|
337
|
+
* workspace.
|
|
338
|
+
*
|
|
339
|
+
* @since 3.17.0.
|
|
340
|
+
*/
|
|
341
|
+
inlineValues?: InlineValuesWorkspaceClientCapabilities;
|
|
250
342
|
}
|
|
251
343
|
/**
|
|
252
344
|
* Text document specific client capabilities.
|
|
@@ -373,7 +465,19 @@ export interface TextDocumentClientCapabilities {
|
|
|
373
465
|
*
|
|
374
466
|
* @since 3.16.0
|
|
375
467
|
*/
|
|
376
|
-
moniker
|
|
468
|
+
moniker?: MonikerClientCapabilities;
|
|
469
|
+
/**
|
|
470
|
+
* Capabilities specific to the various type hierarchy requests.
|
|
471
|
+
*
|
|
472
|
+
* @since 3.17.0 - proposed state
|
|
473
|
+
*/
|
|
474
|
+
typeHierarchy?: TypeHierarchyClientCapabilities;
|
|
475
|
+
/**
|
|
476
|
+
* Capabilities specific to the `textDocument/inlineValues` request.
|
|
477
|
+
*
|
|
478
|
+
* @since 3.17.0 - proposed state
|
|
479
|
+
*/
|
|
480
|
+
inlineValues?: InlineValuesClientCapabilities;
|
|
377
481
|
}
|
|
378
482
|
export interface WindowClientCapabilities {
|
|
379
483
|
/**
|
|
@@ -426,6 +530,13 @@ export interface MarkdownClientCapabilities {
|
|
|
426
530
|
* The version of the parser.
|
|
427
531
|
*/
|
|
428
532
|
version?: string;
|
|
533
|
+
/**
|
|
534
|
+
* A list of HTML tags that the client allows / supports in
|
|
535
|
+
* Markdown.
|
|
536
|
+
*
|
|
537
|
+
* @since 3.17.0
|
|
538
|
+
*/
|
|
539
|
+
allowedTags?: string[];
|
|
429
540
|
}
|
|
430
541
|
/**
|
|
431
542
|
* General client capabilities.
|
|
@@ -433,6 +544,26 @@ export interface MarkdownClientCapabilities {
|
|
|
433
544
|
* @since 3.16.0
|
|
434
545
|
*/
|
|
435
546
|
export interface GeneralClientCapabilities {
|
|
547
|
+
/**
|
|
548
|
+
* Client capability that signals how the client
|
|
549
|
+
* handles stale requests (e.g. a request
|
|
550
|
+
* for which the client will not process the response
|
|
551
|
+
* anymore since the information is outdated).
|
|
552
|
+
*
|
|
553
|
+
* @since 3.17.0
|
|
554
|
+
*/
|
|
555
|
+
staleRequestSupport?: {
|
|
556
|
+
/**
|
|
557
|
+
* The client will actively cancel the request.
|
|
558
|
+
*/
|
|
559
|
+
cancel: boolean;
|
|
560
|
+
/**
|
|
561
|
+
* The list of requests for which the client
|
|
562
|
+
* will retry the request if it receives a
|
|
563
|
+
* response with error code `ContentModified`
|
|
564
|
+
*/
|
|
565
|
+
retryOnContentModified: string[];
|
|
566
|
+
};
|
|
436
567
|
/**
|
|
437
568
|
* Client capabilities specific to regular expressions.
|
|
438
569
|
*
|
|
@@ -670,6 +801,18 @@ export interface _ServerCapabilities<T = any> {
|
|
|
670
801
|
* @since 3.16.0
|
|
671
802
|
*/
|
|
672
803
|
monikerProvider?: boolean | MonikerOptions | MonikerRegistrationOptions;
|
|
804
|
+
/**
|
|
805
|
+
* The server provides type hierarchy support.
|
|
806
|
+
*
|
|
807
|
+
* @since 3.17.0 - proposed state
|
|
808
|
+
*/
|
|
809
|
+
typeHierarchyProvider?: boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions;
|
|
810
|
+
/**
|
|
811
|
+
* The server provides inline values.
|
|
812
|
+
*
|
|
813
|
+
* @since 3.17.0 - proposed state
|
|
814
|
+
*/
|
|
815
|
+
inlineValuesProvider?: boolean | InlineValuesOptions | InlineValuesRegistrationOptions;
|
|
673
816
|
/**
|
|
674
817
|
* Experimental server capabilities.
|
|
675
818
|
*/
|
|
@@ -743,11 +886,11 @@ export interface _InitializeParams extends WorkDoneProgressParams {
|
|
|
743
886
|
/**
|
|
744
887
|
* User provided initialization options.
|
|
745
888
|
*/
|
|
746
|
-
initializationOptions?:
|
|
889
|
+
initializationOptions?: LSPAny;
|
|
747
890
|
/**
|
|
748
891
|
* The initial trace setting. If omitted trace is disabled ('off').
|
|
749
892
|
*/
|
|
750
|
-
trace?: 'off' | 'messages' | 'verbose';
|
|
893
|
+
trace?: 'off' | 'messages' | 'compact' | 'verbose';
|
|
751
894
|
}
|
|
752
895
|
export declare type InitializeParams = _InitializeParams & WorkspaceFoldersInitializeParams;
|
|
753
896
|
/**
|
|
@@ -776,7 +919,7 @@ export interface InitializeResult<T = any> {
|
|
|
776
919
|
/**
|
|
777
920
|
* Custom initialization results.
|
|
778
921
|
*/
|
|
779
|
-
[custom: string]:
|
|
922
|
+
[custom: string]: LSPAny | ServerCapabilities<T> | undefined; /** undefined is needed since serverInfo is optional */
|
|
780
923
|
}
|
|
781
924
|
/**
|
|
782
925
|
* Known error codes for an `InitializeError`;
|
|
@@ -852,7 +995,7 @@ export interface DidChangeConfigurationParams {
|
|
|
852
995
|
/**
|
|
853
996
|
* The actual changed settings
|
|
854
997
|
*/
|
|
855
|
-
settings:
|
|
998
|
+
settings: LSPAny;
|
|
856
999
|
}
|
|
857
1000
|
/**
|
|
858
1001
|
* The message type
|
|
@@ -1498,6 +1641,13 @@ export interface CompletionClientCapabilities {
|
|
|
1498
1641
|
insertTextModeSupport?: {
|
|
1499
1642
|
valueSet: InsertTextMode[];
|
|
1500
1643
|
};
|
|
1644
|
+
/**
|
|
1645
|
+
* The client has support for completion item label
|
|
1646
|
+
* details (see also `CompletionItemLabelDetails`).
|
|
1647
|
+
*
|
|
1648
|
+
* @since 3.17.0 - proposed state
|
|
1649
|
+
*/
|
|
1650
|
+
labelDetailsSupport?: boolean;
|
|
1501
1651
|
};
|
|
1502
1652
|
completionItemKind?: {
|
|
1503
1653
|
/**
|
|
@@ -1517,7 +1667,7 @@ export interface CompletionClientCapabilities {
|
|
|
1517
1667
|
* when accepting a completion item that uses multi line
|
|
1518
1668
|
* text in either `insertText` or `textEdit`.
|
|
1519
1669
|
*
|
|
1520
|
-
* @since 3.
|
|
1670
|
+
* @since 3.17.0 - proposed state
|
|
1521
1671
|
*/
|
|
1522
1672
|
insertTextMode?: InsertTextMode;
|
|
1523
1673
|
/**
|
|
@@ -1525,6 +1675,25 @@ export interface CompletionClientCapabilities {
|
|
|
1525
1675
|
* `textDocument/completion` request.
|
|
1526
1676
|
*/
|
|
1527
1677
|
contextSupport?: boolean;
|
|
1678
|
+
/**
|
|
1679
|
+
* The client supports the following `CompletionList` specific
|
|
1680
|
+
* capabilities.
|
|
1681
|
+
*
|
|
1682
|
+
* @since 3.17.0 - proposed state
|
|
1683
|
+
*/
|
|
1684
|
+
completionList?: {
|
|
1685
|
+
/**
|
|
1686
|
+
* The client supports the the following itemDefaults on
|
|
1687
|
+
* a completion list.
|
|
1688
|
+
*
|
|
1689
|
+
* The value lists the supported property names of the
|
|
1690
|
+
* `CompletionList.itemDefaults` object. If omitted
|
|
1691
|
+
* no properties are supported.
|
|
1692
|
+
*
|
|
1693
|
+
* @since 3.17.0 - proposed state
|
|
1694
|
+
*/
|
|
1695
|
+
itemDefaults?: string[];
|
|
1696
|
+
};
|
|
1528
1697
|
}
|
|
1529
1698
|
/**
|
|
1530
1699
|
* How a completion was triggered
|
|
@@ -1601,6 +1770,22 @@ export interface CompletionOptions extends WorkDoneProgressOptions {
|
|
|
1601
1770
|
* information for a completion item.
|
|
1602
1771
|
*/
|
|
1603
1772
|
resolveProvider?: boolean;
|
|
1773
|
+
/**
|
|
1774
|
+
* The server supports the following `CompletionItem` specific
|
|
1775
|
+
* capabilities.
|
|
1776
|
+
*
|
|
1777
|
+
* @since 3.17.0 - proposed state
|
|
1778
|
+
*/
|
|
1779
|
+
completionItem?: {
|
|
1780
|
+
/**
|
|
1781
|
+
* The server has support for completion item label
|
|
1782
|
+
* details (see also `CompletionItemLabelDetails`) when
|
|
1783
|
+
* receiving a completion item in a resolve call.
|
|
1784
|
+
*
|
|
1785
|
+
* @since 3.17.0 - proposed state
|
|
1786
|
+
*/
|
|
1787
|
+
labelDetailsSupport?: boolean;
|
|
1788
|
+
};
|
|
1604
1789
|
}
|
|
1605
1790
|
/**
|
|
1606
1791
|
* Registration options for a [CompletionRequest](#CompletionRequest).
|
|
@@ -1843,7 +2028,7 @@ export interface DefinitionRegistrationOptions extends TextDocumentRegistrationO
|
|
|
1843
2028
|
*/
|
|
1844
2029
|
export declare namespace DefinitionRequest {
|
|
1845
2030
|
const method: 'textDocument/definition';
|
|
1846
|
-
const type: ProtocolRequestType<DefinitionParams,
|
|
2031
|
+
const type: ProtocolRequestType<DefinitionParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, DefinitionRegistrationOptions>;
|
|
1847
2032
|
}
|
|
1848
2033
|
/**
|
|
1849
2034
|
* Client Capabilities for a [ReferencesRequest](#ReferencesRequest).
|
|
@@ -2165,6 +2350,20 @@ export interface WorkspaceSymbolClientCapabilities {
|
|
|
2165
2350
|
*/
|
|
2166
2351
|
valueSet: SymbolTag[];
|
|
2167
2352
|
};
|
|
2353
|
+
/**
|
|
2354
|
+
* The client support partial workspace symbols. The client will send the
|
|
2355
|
+
* request `workspaceSymbol/resolve` to the server to resolve additional
|
|
2356
|
+
* properties.
|
|
2357
|
+
*
|
|
2358
|
+
* @since 3.17.0 - proposedState
|
|
2359
|
+
*/
|
|
2360
|
+
resolveSupport?: {
|
|
2361
|
+
/**
|
|
2362
|
+
* The properties that a client can resolve lazily. Usually
|
|
2363
|
+
* `location.range`
|
|
2364
|
+
*/
|
|
2365
|
+
properties: string[];
|
|
2366
|
+
};
|
|
2168
2367
|
}
|
|
2169
2368
|
/**
|
|
2170
2369
|
* The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
|
|
@@ -2180,6 +2379,13 @@ export interface WorkspaceSymbolParams extends WorkDoneProgressParams, PartialRe
|
|
|
2180
2379
|
* Server capabilities for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
|
|
2181
2380
|
*/
|
|
2182
2381
|
export interface WorkspaceSymbolOptions extends WorkDoneProgressOptions {
|
|
2382
|
+
/**
|
|
2383
|
+
* The server provides support to resolve additional
|
|
2384
|
+
* information for a workspace symbol.
|
|
2385
|
+
*
|
|
2386
|
+
* @since 3.17.0 - proposed state
|
|
2387
|
+
*/
|
|
2388
|
+
resolveProvider?: boolean;
|
|
2183
2389
|
}
|
|
2184
2390
|
/**
|
|
2185
2391
|
* Registration options for a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest).
|
|
@@ -2191,10 +2397,25 @@ export interface WorkspaceSymbolRegistrationOptions extends WorkspaceSymbolOptio
|
|
|
2191
2397
|
* by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
|
|
2192
2398
|
* of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
|
|
2193
2399
|
* resolves to such.
|
|
2400
|
+
*
|
|
2401
|
+
* @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients
|
|
2402
|
+
* need to advertise support for WorkspaceSymbols via the client capability
|
|
2403
|
+
* `workspace.symbol.resolveSupport`.
|
|
2404
|
+
*
|
|
2194
2405
|
*/
|
|
2195
2406
|
export declare namespace WorkspaceSymbolRequest {
|
|
2196
2407
|
const method: 'workspace/symbol';
|
|
2197
|
-
const type: ProtocolRequestType<WorkspaceSymbolParams, SymbolInformation[] | null, SymbolInformation[], void, WorkspaceSymbolRegistrationOptions>;
|
|
2408
|
+
const type: ProtocolRequestType<WorkspaceSymbolParams, SymbolInformation[] | WorkspaceSymbol[] | null, SymbolInformation[] | WorkspaceSymbol[], void, WorkspaceSymbolRegistrationOptions>;
|
|
2409
|
+
}
|
|
2410
|
+
/**
|
|
2411
|
+
* A request to resolve the range inside the workspace
|
|
2412
|
+
* symbol's location.
|
|
2413
|
+
*
|
|
2414
|
+
* @since 3.17.0 - proposed state
|
|
2415
|
+
*/
|
|
2416
|
+
export declare namespace WorkspaceSymbolResolveRequest {
|
|
2417
|
+
const method: 'workspaceSymbol/resolve';
|
|
2418
|
+
const type: ProtocolRequestType<WorkspaceSymbol, WorkspaceSymbol, never, void, void>;
|
|
2198
2419
|
}
|
|
2199
2420
|
/**
|
|
2200
2421
|
* The client capabilities of a [CodeLensRequest](#CodeLensRequest).
|
|
@@ -2575,7 +2796,7 @@ export interface ExecuteCommandParams extends WorkDoneProgressParams {
|
|
|
2575
2796
|
/**
|
|
2576
2797
|
* Arguments that the command should be invoked with.
|
|
2577
2798
|
*/
|
|
2578
|
-
arguments?:
|
|
2799
|
+
arguments?: LSPAny[];
|
|
2579
2800
|
}
|
|
2580
2801
|
/**
|
|
2581
2802
|
* The server capabilities of a [ExecuteCommandRequest](#ExecuteCommandRequest).
|
|
@@ -2596,7 +2817,7 @@ export interface ExecuteCommandRegistrationOptions extends ExecuteCommandOptions
|
|
|
2596
2817
|
* a workspace edit which the client will apply to the workspace.
|
|
2597
2818
|
*/
|
|
2598
2819
|
export declare namespace ExecuteCommandRequest {
|
|
2599
|
-
const type: ProtocolRequestType<ExecuteCommandParams,
|
|
2820
|
+
const type: ProtocolRequestType<ExecuteCommandParams, void | LSPAny, never, void, ExecuteCommandRegistrationOptions>;
|
|
2600
2821
|
}
|
|
2601
2822
|
export interface WorkspaceEditClientCapabilities {
|
|
2602
2823
|
/**
|
|
@@ -2658,9 +2879,11 @@ export interface ApplyWorkspaceEditParams {
|
|
|
2658
2879
|
edit: WorkspaceEdit;
|
|
2659
2880
|
}
|
|
2660
2881
|
/**
|
|
2661
|
-
*
|
|
2882
|
+
* The result returned from the apply workspace edit request.
|
|
2883
|
+
*
|
|
2884
|
+
* @since 3.17 renamed from ApplyWorkspaceEditResponse
|
|
2662
2885
|
*/
|
|
2663
|
-
export interface
|
|
2886
|
+
export interface ApplyWorkspaceEditResult {
|
|
2664
2887
|
/**
|
|
2665
2888
|
* Indicates whether the edit was applied or not.
|
|
2666
2889
|
*/
|
|
@@ -2678,11 +2901,15 @@ export interface ApplyWorkspaceEditResponse {
|
|
|
2678
2901
|
*/
|
|
2679
2902
|
failedChange?: uinteger;
|
|
2680
2903
|
}
|
|
2904
|
+
/**
|
|
2905
|
+
* @deprecated Use ApplyWorkspaceEditResult instead.
|
|
2906
|
+
*/
|
|
2907
|
+
export declare type ApplyWorkspaceEditResponse = ApplyWorkspaceEditResult;
|
|
2681
2908
|
/**
|
|
2682
2909
|
* A request sent from the server to the client to modified certain resources.
|
|
2683
2910
|
*/
|
|
2684
2911
|
export declare namespace ApplyWorkspaceEditRequest {
|
|
2685
|
-
const type: ProtocolRequestType<ApplyWorkspaceEditParams,
|
|
2912
|
+
const type: ProtocolRequestType<ApplyWorkspaceEditParams, ApplyWorkspaceEditResult, never, void, void>;
|
|
2686
2913
|
}
|
|
2687
|
-
export { ImplementationRequest, ImplementationParams, ImplementationRegistrationOptions, ImplementationOptions, TypeDefinitionRequest, TypeDefinitionParams, TypeDefinitionRegistrationOptions, TypeDefinitionOptions, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorRegistrationOptions, FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, DeclarationClientCapabilities, DeclarationRequest, DeclarationParams, DeclarationRegistrationOptions, DeclarationOptions, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeParams, SelectionRangeRequest, SelectionRangeRegistrationOptions, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification, CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest,
|
|
2914
|
+
export { ImplementationRequest, ImplementationParams, ImplementationRegistrationOptions, ImplementationOptions, TypeDefinitionRequest, TypeDefinitionParams, TypeDefinitionRegistrationOptions, TypeDefinitionOptions, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFolder, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorRegistrationOptions, FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, DeclarationClientCapabilities, DeclarationRequest, DeclarationParams, DeclarationRegistrationOptions, DeclarationOptions, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeParams, SelectionRangeRequest, SelectionRangeRegistrationOptions, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification, CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest, SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensRegistrationType, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult, ShowDocumentClientCapabilities, LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest, FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest, UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest, };
|
|
2688
2915
|
export { DocumentColorOptions as ColorProviderOptions, DocumentColorOptions as ColorOptions, FoldingRangeOptions as FoldingRangeProviderOptions, SelectionRangeOptions as SelectionRangeProviderOptions, DocumentColorRegistrationOptions as ColorRegistrationOptions };
|
|
@@ -32,6 +32,6 @@ export interface DeclarationParams extends TextDocumentPositionParams, WorkDoneP
|
|
|
32
32
|
*/
|
|
33
33
|
export declare namespace DeclarationRequest {
|
|
34
34
|
const method: 'textDocument/declaration';
|
|
35
|
-
const type: ProtocolRequestType<DeclarationParams,
|
|
35
|
+
const type: ProtocolRequestType<DeclarationParams, Declaration | LocationLink[] | null, Location[] | LocationLink[], void, DeclarationRegistrationOptions>;
|
|
36
36
|
type HandlerSignature = RequestHandler<DeclarationParams, Declaration | DeclarationLink[] | null, void>;
|
|
37
37
|
}
|
|
@@ -83,7 +83,7 @@ interface FileOperationPattern {
|
|
|
83
83
|
* - `*` to match one or more characters in a path segment
|
|
84
84
|
* - `?` to match on one character in a path segment
|
|
85
85
|
* - `**` to match any number of path segments, including none
|
|
86
|
-
* - `{}` to group
|
|
86
|
+
* - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
|
|
87
87
|
* - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
|
|
88
88
|
* - `[!...]` 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`)
|
|
89
89
|
*/
|
|
@@ -33,6 +33,6 @@ export interface ImplementationParams extends TextDocumentPositionParams, WorkDo
|
|
|
33
33
|
*/
|
|
34
34
|
export declare namespace ImplementationRequest {
|
|
35
35
|
const method: 'textDocument/implementation';
|
|
36
|
-
const type: ProtocolRequestType<ImplementationParams,
|
|
36
|
+
const type: ProtocolRequestType<ImplementationParams, Definition | LocationLink[] | null, Location[] | LocationLink[], void, ImplementationRegistrationOptions>;
|
|
37
37
|
type HandlerSignature = RequestHandler<ImplementationParams, Definition | DefinitionLink[] | null, void>;
|
|
38
38
|
}
|
package/lib/common/protocol.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
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.
|
|
8
|
-
exports.MonikerRequest = exports.MonikerKind = 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.
|
|
9
|
-
const Is = require("./utils/is");
|
|
7
|
+
exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = 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.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.InitializeError = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0;
|
|
8
|
+
exports.MonikerRequest = exports.MonikerKind = 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.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.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = void 0;
|
|
10
9
|
const messages_1 = require("./messages");
|
|
10
|
+
const Is = require("./utils/is");
|
|
11
11
|
const protocol_implementation_1 = require("./protocol.implementation");
|
|
12
12
|
Object.defineProperty(exports, "ImplementationRequest", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } });
|
|
13
13
|
const protocol_typeDefinition_1 = require("./protocol.typeDefinition");
|
|
@@ -35,9 +35,6 @@ Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", { enumerable
|
|
|
35
35
|
Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } });
|
|
36
36
|
Object.defineProperty(exports, "CallHierarchyPrepareRequest", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } });
|
|
37
37
|
const protocol_semanticTokens_1 = require("./protocol.semanticTokens");
|
|
38
|
-
Object.defineProperty(exports, "SemanticTokenTypes", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenTypes; } });
|
|
39
|
-
Object.defineProperty(exports, "SemanticTokenModifiers", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenModifiers; } });
|
|
40
|
-
Object.defineProperty(exports, "SemanticTokens", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokens; } });
|
|
41
38
|
Object.defineProperty(exports, "TokenFormat", { enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } });
|
|
42
39
|
Object.defineProperty(exports, "SemanticTokensRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } });
|
|
43
40
|
Object.defineProperty(exports, "SemanticTokensDeltaRequest", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } });
|
|
@@ -63,17 +60,47 @@ Object.defineProperty(exports, "MonikerRequest", { enumerable: true, get: functi
|
|
|
63
60
|
// @ts-ignore: to avoid inlining LocationLink as dynamic import
|
|
64
61
|
let __noDynamicImport;
|
|
65
62
|
/**
|
|
66
|
-
* The
|
|
67
|
-
* [
|
|
63
|
+
* The TextDocumentFilter namespace provides helper functions to work with
|
|
64
|
+
* [TextDocumentFilter](#TextDocumentFilter) literals.
|
|
65
|
+
*
|
|
66
|
+
* @since 3.17.0 - proposed state.
|
|
68
67
|
*/
|
|
69
|
-
var
|
|
70
|
-
(function (
|
|
68
|
+
var TextDocumentFilter;
|
|
69
|
+
(function (TextDocumentFilter) {
|
|
71
70
|
function is(value) {
|
|
72
71
|
const candidate = value;
|
|
73
72
|
return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
|
|
74
73
|
}
|
|
75
|
-
|
|
76
|
-
})(
|
|
74
|
+
TextDocumentFilter.is = is;
|
|
75
|
+
})(TextDocumentFilter = exports.TextDocumentFilter || (exports.TextDocumentFilter = {}));
|
|
76
|
+
/**
|
|
77
|
+
* The NotebookDocumentFilter namespace provides helper functions to work with
|
|
78
|
+
* [NotebookDocumentFilter](#NotebookDocumentFilter) literals.
|
|
79
|
+
*
|
|
80
|
+
* @since 3.17.0 - proposed state.
|
|
81
|
+
*/
|
|
82
|
+
var NotebookDocumentFilter;
|
|
83
|
+
(function (NotebookDocumentFilter) {
|
|
84
|
+
function is(value) {
|
|
85
|
+
const candidate = value;
|
|
86
|
+
return Is.objectLiteral(candidate) && (Is.string(candidate.notebookType) || Is.string(candidate.scheme) || Is.string(candidate.pattern));
|
|
87
|
+
}
|
|
88
|
+
NotebookDocumentFilter.is = is;
|
|
89
|
+
})(NotebookDocumentFilter = exports.NotebookDocumentFilter || (exports.NotebookDocumentFilter = {}));
|
|
90
|
+
/**
|
|
91
|
+
* The NotebookCellTextDocumentFilter namespace provides helper functions to work with
|
|
92
|
+
* [NotebookCellTextDocumentFilter](#NotebookCellTextDocumentFilter) literals.
|
|
93
|
+
*
|
|
94
|
+
* @since 3.17.0 - proposed state.
|
|
95
|
+
*/
|
|
96
|
+
var NotebookCellTextDocumentFilter;
|
|
97
|
+
(function (NotebookCellTextDocumentFilter) {
|
|
98
|
+
function is(value) {
|
|
99
|
+
const candidate = value;
|
|
100
|
+
return Is.objectLiteral(candidate) && NotebookDocumentFilter.is(candidate.notebookDocument) && (candidate.cellLanguage === undefined || Is.string(candidate.cellLanguage));
|
|
101
|
+
}
|
|
102
|
+
NotebookCellTextDocumentFilter.is = is;
|
|
103
|
+
})(NotebookCellTextDocumentFilter = exports.NotebookCellTextDocumentFilter || (exports.NotebookCellTextDocumentFilter = {}));
|
|
77
104
|
/**
|
|
78
105
|
* The DocumentSelector namespace provides helper functions to work with
|
|
79
106
|
* [DocumentSelector](#DocumentSelector)s.
|
|
@@ -85,7 +112,7 @@ var DocumentSelector;
|
|
|
85
112
|
return false;
|
|
86
113
|
}
|
|
87
114
|
for (let elem of value) {
|
|
88
|
-
if (!Is.string(elem) && !
|
|
115
|
+
if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) {
|
|
89
116
|
return false;
|
|
90
117
|
}
|
|
91
118
|
}
|
|
@@ -636,12 +663,28 @@ var CodeActionResolveRequest;
|
|
|
636
663
|
* by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
|
|
637
664
|
* of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
|
|
638
665
|
* resolves to such.
|
|
666
|
+
*
|
|
667
|
+
* @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients
|
|
668
|
+
* need to advertise support for WorkspaceSymbols via the client capability
|
|
669
|
+
* `workspace.symbol.resolveSupport`.
|
|
670
|
+
*
|
|
639
671
|
*/
|
|
640
672
|
var WorkspaceSymbolRequest;
|
|
641
673
|
(function (WorkspaceSymbolRequest) {
|
|
642
674
|
WorkspaceSymbolRequest.method = 'workspace/symbol';
|
|
643
675
|
WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
|
|
644
676
|
})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
|
|
677
|
+
/**
|
|
678
|
+
* A request to resolve the range inside the workspace
|
|
679
|
+
* symbol's location.
|
|
680
|
+
*
|
|
681
|
+
* @since 3.17.0 - proposed state
|
|
682
|
+
*/
|
|
683
|
+
var WorkspaceSymbolResolveRequest;
|
|
684
|
+
(function (WorkspaceSymbolResolveRequest) {
|
|
685
|
+
WorkspaceSymbolResolveRequest.method = 'workspaceSymbol/resolve';
|
|
686
|
+
WorkspaceSymbolResolveRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolResolveRequest.method);
|
|
687
|
+
})(WorkspaceSymbolResolveRequest = exports.WorkspaceSymbolResolveRequest || (exports.WorkspaceSymbolResolveRequest = {}));
|
|
645
688
|
/**
|
|
646
689
|
* A request to provide code lens for the given text document.
|
|
647
690
|
*/
|