-
Notifications
You must be signed in to change notification settings - Fork 321
/
protocol.ts
1498 lines (1309 loc) · 37.3 KB
/
protocol.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
'use strict';
import * as Is from './utils/is';
import { RequestType, RequestType0, NotificationType, NotificationType0 } from 'vscode-jsonrpc';
import {
TextDocumentContentChangeEvent, Position, Range, Location, Diagnostic, Command,
TextEdit, WorkspaceEdit, WorkspaceSymbolParams,
TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, TextDocumentSaveReason,
CompletionItem, CompletionList, Hover, SignatureHelp,
Definition, ReferenceContext, DocumentHighlight, DocumentSymbolParams,
SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink
} from 'vscode-languageserver-types';
/**
* A document filter denotes a document by different properties like
* the [language](#TextDocument.languageId), the [scheme](#Uri.scheme) of
* its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName).
*
* @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
* @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
*/
export type DocumentFilter = {
/** A language id, like `typescript`. */
language: string;
/** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
scheme?: string;
/** A glob pattern, like `*.{ts,js}`. */
pattern?: string;
} | {
/** A language id, like `typescript`. */
language?: string;
/** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
scheme: string;
/** A glob pattern, like `*.{ts,js}`. */
pattern?: string;
} | {
/** A language id, like `typescript`. */
language?: string;
/** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
scheme?: string;
/** A glob pattern, like `*.{ts,js}`. */
pattern: string;
};
export namespace DocumentFilter {
export function is(value: any): value is DocumentFilter {
let candidate: DocumentFilter = value;
return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
}
}
/**
* A document selector is the combination of one or many document filters.
*
* @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;
*/
export type DocumentSelector = (string | DocumentFilter)[];
/**
* General paramters to to regsiter for an notification or to register a provider.
*/
export interface Registration {
/**
* The id used to register the request. The id can be used to deregister
* the request again.
*/
id: string;
/**
* The method to register for.
*/
method: string;
/**
* Options necessary for the registration.
*/
registerOptions?: any;
}
export interface RegistrationParams {
registrations: Registration[];
}
/**
* The `client/registerFeature` request is sent from the server to the client to register a new feature
* handler on the client side.
*/
export namespace RegistrationRequest {
export const type = new RequestType<RegistrationParams, void, void, void>('client/registerFeature');
}
/**
* General parameters to unregister a request or notification.
*/
export interface Unregistration {
/**
* The id used to unregister the request or notification. Usually an id
* provided during the register request.
*/
id: string;
/**
* The method to unregister for.
*/
method: string;
}
export interface UnregistrationParams {
unregisterations: Unregistration[];
}
/**
* The `client/unregisterFeature` request is sent from the server to the client to unregister a previously registered feature
* handler on the client side.
*/
export namespace UnregistrationRequest {
export const type = new RequestType<UnregistrationParams, void, void, void>('client/unregisterFeature');
}
/**
* A parameter literal used in requests to pass a text document and a position inside that
* document.
*/
export interface TextDocumentPositionParams {
/**
* The text document.
*/
textDocument: TextDocumentIdentifier;
/**
* The position inside the text document.
*/
position: Position;
}
//---- Initialize Method ----
/**
* Workspace specific client capabilities.
*/
export interface WorkspaceClientCapabilites {
/**
* The client supports applying batch edits
* to the workspace by supporting the request
* 'workspace/applyEdit'
*/
applyEdit?: boolean;
/**
* Capabilities specific to `WorkspaceEdit`s
*/
workspaceEdit?: {
/**
* The client supports versioned document changes in `WorkspaceEdit`s
*/
documentChanges?: boolean;
};
/**
* Capabilities specific to the `workspace/didChangeConfiguration` notification.
*/
didChangeConfiguration?: {
/**
* Did change configuration notification supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
*/
didChangeWatchedFiles?: {
/**
* Did change watched files notification supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `workspace/symbol` request.
*/
symbol?: {
/**
* Symbol request supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `workspace/executeCommand` request.
*/
executeCommand?: {
/**
* Execute command supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
}
/**
* Text document specific client capabilities.
*/
export interface TextDocumentClientCapabilities {
/**
* Defines which synchronization capabilities the client supports.
*/
synchronization?: {
/**
* Whether text document synchronization supports dynamic registration.
*/
dynamicRegistration?: boolean;
/**
* The client supports sending will save notifications.
*/
willSave?: boolean;
/**
* The client supports sending a will save request and
* waits for a response providing text edits which will
* be applied to the document before it is saved.
*/
willSaveWaitUntil?: boolean;
/**
* The client supports did save notifications.
*/
didSave?: boolean;
}
/**
* Capabilities specific to the `textDocument/completion`
*/
completion?: {
/**
* Whether completion supports dynamic registration.
*/
dynamicRegistration?: boolean;
/**
* The client supports the following `CompletionItem` specific
* capabilities.
*/
completionItem?: {
/**
* Client supports snippets as insert text.
*
* A snippet can define tab stops and placeholders with `$1`, `$2`
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
* the end of the snippet. Placeholders with equal identifiers are linked,
* that is typing in one will update others too.
*/
snippetSupport?: boolean;
}
};
/**
* Capabilities specific to the `textDocument/hover`
*/
hover?: {
/**
* Whether hover supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/signatureHelp`
*/
signatureHelp?: {
/**
* Whether signature help supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/references`
*/
references?: {
/**
* Whether references supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/documentHighlight`
*/
documentHighlight?: {
/**
* Whether document highlight supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/documentSymbol`
*/
documentSymbol?: {
/**
* Whether document symbol supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/formatting`
*/
formatting?: {
/**
* Whether formatting supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/rangeFormatting`
*/
rangeFormatting?: {
/**
* Whether range formatting supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/onTypeFormatting`
*/
onTypeFormatting?: {
/**
* Whether on type formatting supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/definition`
*/
definition?: {
/**
* Whether definition supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/codeAction`
*/
codeAction?: {
/**
* Whether code action supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/codeLens`
*/
codeLens?: {
/**
* Whether code lens supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/documentLink`
*/
documentLink?: {
/**
* Whether document link supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
/**
* Capabilities specific to the `textDocument/rename`
*/
rename?: {
/**
* Whether rename supports dynamic registration.
*/
dynamicRegistration?: boolean;
};
}
/**
* Defines the capabilities provided by the client.
*/
export interface ClientCapabilities {
/**
* Workspace specific client capabilities.
*/
workspace?: WorkspaceClientCapabilites;
/**
* Text document specific client capabilities.
*/
textDocument?: TextDocumentClientCapabilities;
/**
* Experimental client capabilities.
*/
experimental?: any;
}
/**
* Defines how the host (editor) should sync
* document changes to the language server.
*/
export namespace TextDocumentSyncKind {
/**
* Documents should not be synced at all.
*/
export const None = 0;
/**
* Documents are synced by always sending the full content
* of the document.
*/
export const Full = 1;
/**
* Documents are synced by sending the full content on open.
* After that only incremental updates to the document are
* send.
*/
export const Incremental = 2;
}
export type TextDocumentSyncKind = 0 | 1 | 2;
/**
* General text document registration options.
*/
export interface TextDocumentRegistrationOptions {
/**
* A document selector to identify the scope of the registration. If set to null
* the document selector provided on the client side will be used.
*/
documentSelector: DocumentSelector | null;
}
/**
* Completion options.
*/
export interface CompletionOptions {
/**
* The server provides support to resolve additional
* information for a completion item.
*/
resolveProvider?: boolean;
/**
* The characters that trigger completion automatically.
*/
triggerCharacters?: string[];
}
/**
* Signature help options.
*/
export interface SignatureHelpOptions {
/**
* The characters that trigger signature help
* automatically.
*/
triggerCharacters?: string[];
}
/**
* Code Lens options.
*/
export interface CodeLensOptions {
/**
* Code lens has a resolve provider as well.
*/
resolveProvider?: boolean;
}
/**
* Format document on type options
*/
export interface DocumentOnTypeFormattingOptions {
/**
* A character on which formatting should be triggered, like `}`.
*/
firstTriggerCharacter: string;
/**
* More trigger characters.
*/
moreTriggerCharacter?: string[];
}
/**
* Document link options
*/
export interface DocumentLinkOptions {
/**
* Document links have a resolve provider as well.
*/
resolveProvider?: boolean;
}
/**
* Execute command options.
*/
export interface ExecuteCommandOptions {
/**
* The commands to be executed on the server
*/
commands: string[]
}
/**
* Save options.
*/
export interface SaveOptions {
/**
* The client is supposed to include the content on save.
*/
includeText?: boolean;
}
export interface TextDocumentSyncOptions {
/**
* Open and close notifications are sent to the server.
*/
openClose?: boolean;
/**
* Change notificatins are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
* and TextDocumentSyncKindIncremental.
*/
change?: TextDocumentSyncKind;
/**
* Will save notifications are sent to the server.
*/
willSave?: boolean;
/**
* Will save wait until requests are sent to the server.
*/
willSaveWaitUntil?: boolean;
/**
* Save notifications are sent to the server.
*/
save?: SaveOptions;
}
/**
* Defines the capabilities provided by a language
* server.
*/
export interface ServerCapabilities {
/**
* Defines how text documents are synced. Is either a detailed structure defining each notification or
* for backwards compatibility the TextDocumentSyncKind number.
*/
textDocumentSync?: TextDocumentSyncOptions | TextDocumentSyncKind;
/**
* The server provides hover support.
*/
hoverProvider?: boolean;
/**
* The server provides completion support.
*/
completionProvider?: CompletionOptions;
/**
* The server provides signature help support.
*/
signatureHelpProvider?: SignatureHelpOptions;
/**
* The server provides goto definition support.
*/
definitionProvider?: boolean;
/**
* The server provides find references support.
*/
referencesProvider?: boolean;
/**
* The server provides document highlight support.
*/
documentHighlightProvider?: boolean;
/**
* The server provides document symbol support.
*/
documentSymbolProvider?: boolean;
/**
* The server provides workspace symbol support.
*/
workspaceSymbolProvider?: boolean;
/**
* The server provides code actions.
*/
codeActionProvider?: boolean;
/**
* The server provides code lens.
*/
codeLensProvider?: CodeLensOptions;
/**
* The server provides document formatting.
*/
documentFormattingProvider?: boolean;
/**
* The server provides document range formatting.
*/
documentRangeFormattingProvider?: boolean;
/**
* The server provides document formatting on typing.
*/
documentOnTypeFormattingProvider?: {
/**
* A character on which formatting should be triggered, like `}`.
*/
firstTriggerCharacter: string;
/**
* More trigger characters.
*/
moreTriggerCharacter?: string[]
};
/**
* The server provides rename support.
*/
renameProvider?: boolean;
/**
* The server provides document link support.
*/
documentLinkProvider?: DocumentLinkOptions;
/**
* The server provides execute command support.
*/
executeCommandProvider?: ExecuteCommandOptions;
/**
* Experimental server capabilities.
*/
experimental?: any;
}
/**
* The initialize request is sent from the client to the server.
* It is sent once as the request after starting up the server.
* The requests parameter is of type [InitializeParams](#InitializeParams)
* the response if of type [InitializeResult](#InitializeResult) of a Thenable that
* resolves to such.
*/
export namespace InitializeRequest {
export const type = new RequestType<InitializeParams, InitializeResult, InitializeError, void>('initialize');
}
/**
* The initialize parameters
*/
export interface InitializeParams {
/**
* The process Id of the parent process that started
* the server.
*/
processId: number;
/**
* The rootPath of the workspace. Is null
* if no folder is open.
*
* @deprecated in favour of rootUri.
*/
rootPath?: string | null;
/**
* The rootUri of the workspace. Is null if no
* folder is open. If both `rootPath` and `rootUri` are set
* `rootUri` wins.
*/
rootUri: string | null;
/**
* The capabilities provided by the client (editor or tool)
*/
capabilities: ClientCapabilities;
/**
* User provided initialization options.
*/
initializationOptions?: any;
/**
* The initial trace setting. If omitted trace is disabled ('off').
*/
trace?: 'off' | 'messages' | 'verbose';
}
/**
* The result returned from an initilize request.
*/
export interface InitializeResult {
/**
* The capabilities the language server provides.
*/
capabilities: ServerCapabilities;
}
/**
* Known error codes for an `InitializeError`;
*/
export namespace InitializeError {
/**
* If the protocol version provided by the client can't be handled by the server.
* @deprecated This initialize error got replaced by client capabilities. There is
* no version handshake in version 3.0x
*/
export const unknownProtocolVersion: number = 1;
}
/**
* The data type of the ResponseError if the
* initialize request fails.
*/
export interface InitializeError {
/**
* Indicates whether the client execute the following retry logic:
* (1) show the message provided by the ResponseError to the user
* (2) user selects retry or cancel
* (3) if user selected retry the initialize method is sent again.
*/
retry: boolean;
}
export interface InitializedParams {
}
/**
* The intialized notification is send from the client to the
* server after the client is fully initialized and the server
* is allowed to send requests from the server to the client.
*/
export namespace InitializedNotification {
export const type = new NotificationType<InitializedParams, void>('initialized');
}
//---- Shutdown Method ----
/**
* A shutdown request is sent from the client to the server.
* It is sent once when the client descides to shutdown the
* server. The only notification that is sent after a shudown request
* is the exit event.
*/
export namespace ShutdownRequest {
export const type = new RequestType0<void, void, void>('shutdown');
}
//---- Exit Notification ----
/**
* The exit event is sent from the client to the server to
* ask the server to exit its process.
*/
export namespace ExitNotification {
export const type = new NotificationType0<void>('exit');
}
//---- Configuration notification ----
/**
* The configuration change notification is sent from the client to the server
* when the client's configuration has changed. The notification contains
* the changed configuration as defined by the language client.
*/
export namespace DidChangeConfigurationNotification {
export const type = new NotificationType<DidChangeConfigurationParams, void>('workspace/didChangeConfiguration');
}
/**
* The parameters of a change configuration notification.
*/
export interface DidChangeConfigurationParams {
/**
* The actual changed settings
*/
settings: any;
}
//---- Message show and log notifications ----
/**
* The message type
*/
export namespace MessageType {
/**
* An error message.
*/
export const Error = 1;
/**
* A warning message.
*/
export const Warning = 2;
/**
* An information message.
*/
export const Info = 3;
/**
* A log message.
*/
export const Log = 4;
}
export type MessageType = 1 | 2 | 3 | 4;
/**
* The parameters of a notification message.
*/
export interface ShowMessageParams {
/**
* The message type. See {@link MessageType}
*/
type: MessageType;
/**
* The actual message
*/
message: string;
}
/**
* The show message notification is sent from a server to a client to ask
* the client to display a particular message in the user interface.
*/
export namespace ShowMessageNotification {
export const type = new NotificationType<ShowMessageParams, void>('window/showMessage');
}
export interface MessageActionItem {
/**
* A short title like 'Retry', 'Open Log' etc.
*/
title: string;
}
export interface ShowMessageRequestParams {
/**
* The message type. See {@link MessageType}
*/
type: MessageType;
/**
* The actual message
*/
message: string;
/**
* The message action items to present.
*/
actions?: MessageActionItem[];
}
/**
* The show message request is sent from the server to the clinet to show a message
* and a set of options actions to the user.
*/
export namespace ShowMessageRequest {
export const type = new RequestType<ShowMessageRequestParams, MessageActionItem, void, void>('window/showMessageRequest');
}
/**
* The log message notification is sent from the server to the client to ask
* the client to log a particular message.
*/
export namespace LogMessageNotification {
export const type = new NotificationType<LogMessageParams, void>('window/logMessage');
}
/**
* The log message parameters.
*/
export interface LogMessageParams {
/**
* The message type. See {@link MessageType}
*/
type: MessageType;
/**
* The actual message
*/
message: string;
}
//---- Telemetry notification
/**
* The telemetry event notification is sent from the server to the client to ask
* the client to log telemetry data.
*/
export namespace TelemetryEventNotification {
export const type = new NotificationType<any, void>('telemetry/event');
}
//---- Text document notifications ----
/**
* The parameters send in a open text document notification
*/
export interface DidOpenTextDocumentParams {
/**
* The document that was opened.
*/
textDocument: TextDocumentItem;
}
/**
* The document open notification is sent from the client to the server to signal
* newly opened text documents. The document's truth is now managed by the client
* and the server must not try to read the document's truth using the document's
* uri.
*/
export namespace DidOpenTextDocumentNotification {
export const type = new NotificationType<DidOpenTextDocumentParams, TextDocumentRegistrationOptions>('textDocument/didOpen');
}
/**
* The change text document notification's parameters.
*/
export interface DidChangeTextDocumentParams {
/**
* The document that did change. The version number points
* to the version after all provided content changes have
* been applied.
*/
textDocument: VersionedTextDocumentIdentifier;
/**
* The actual content changes.
*/
contentChanges: TextDocumentContentChangeEvent[];
}
/**
* Descibe options to be used when registered for text document change events.
*/
export interface TextDocumentChangeRegistrationOptions extends TextDocumentRegistrationOptions {
/**
* How documents are synced to the server.
*/
syncKind: TextDocumentSyncKind;
}
/**
* The document change notification is sent from the client to the server to signal
* changes to a text document.
*/
export namespace DidChangeTextDocumentNotification {
export const type = new NotificationType<DidChangeTextDocumentParams, TextDocumentChangeRegistrationOptions>('textDocument/didChange');
}
/**
* The parameters send in a close text document notification
*/
export interface DidCloseTextDocumentParams {
/**
* The document that was closed.
*/
textDocument: TextDocumentIdentifier;
}
/**
* The document close notification is sent from the client to the server when
* the document got closed in the client. The document's truth now exists
* where the document's uri points to (e.g. if the document's uri is a file uri
* the truth now exists on disk).
*/
export namespace DidCloseTextDocumentNotification {
export const type = new NotificationType<DidCloseTextDocumentParams, TextDocumentRegistrationOptions>('textDocument/didClose');
}
/**
* The parameters send in a save text document notification
*/
export interface DidSaveTextDocumentParams {
/**
* The document that was closed.
*/
textDocument: VersionedTextDocumentIdentifier;
/**
* Optional the content when saved. Depends on the includeText value
* when the save notifcation was requested.
*/
text?: string;
}
/**
* Save registration options.
*/
export interface TextDocumentSaveRegistrationOptions extends TextDocumentRegistrationOptions, SaveOptions {
}