-
Notifications
You must be signed in to change notification settings - Fork 45
/
tsprotocol.go
4062 lines (3780 loc) · 113 KB
/
tsprotocol.go
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
// Package protocol contains data types and code for LSP jsonrpcs
// generated automatically from vscode-languageserver-node
// commit: 151b520c995ee3d76729b5c46258ab273d989726
// last fetched Mon Mar 09 2020 10:29:10 GMT-0400 (Eastern Daylight Time)
package protocol
// Code generated (see typescript/README.md) DO NOT EDIT.
/**
* The parameters passed via a apply workspace edit request.
*/
type ApplyWorkspaceEditParams struct {
/**
* An optional label of the workspace edit. This label is
* presented in the user interface for example on an undo
* stack to undo the workspace edit.
*/
Label string `json:"label,omitempty"`
/**
* The edits to apply.
*/
Edit WorkspaceEdit `json:"edit"`
}
/**
* A response returned from the apply workspace edit request.
*/
type ApplyWorkspaceEditResponse struct {
/**
* Indicates whether the edit was applied or not.
*/
Applied bool `json:"applied"`
/**
* An optional textual description for why the edit was not applied.
* This may be used by the server for diagnostic logging or to provide
* a suitable error for a request that triggered the edit.
*/
FailureReason string `json:"failureReason,omitempty"`
/**
* Depending on the client's failure handling strategy `failedChange` might
* contain the index of the change that failed. This property is only available
* if the client signals a `failureHandlingStrategy` in its client capabilities.
*/
FailedChange float64 `json:"failedChange,omitempty"`
}
/**
* Represents an incoming call, e.g. a caller of a method or constructor.
*
* @since 3.16.0 - Proposed state
*/
type CallHierarchyIncomingCall struct {
/**
* The item that makes the call.
*/
From CallHierarchyItem `json:"from"`
/**
* The range at which at which the calls appears. This is relative to the caller
* denoted by [`this.from`](#CallHierarchyIncomingCall.from).
*/
FromRanges []Range `json:"fromRanges"`
}
/**
* The parameter of a `callHierarchy/incomingCalls` request.
*
* @since 3.16.0 - Proposed state
*/
type CallHierarchyIncomingCallsParams struct {
Item CallHierarchyItem `json:"item"`
WorkDoneProgressParams
PartialResultParams
}
/**
* Represents programming constructs like functions or constructors in the context
* of call hierarchy.
*
* @since 3.16.0 - Proposed state
*/
type CallHierarchyItem struct {
/**
* The name of this item.
*/
Name string `json:"name"`
/**
* The kind of this item.
*/
Kind SymbolKind `json:"kind"`
/**
* Tags for this item.
*/
Tags []SymbolTag `json:"tags,omitempty"`
/**
* More detail for this item, e.g. the signature of a function.
*/
Detail string `json:"detail,omitempty"`
/**
* The resource identifier of this item.
*/
URI DocumentURI `json:"uri"`
/**
* The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.
*/
Range Range `json:"range"`
/**
* The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function.
* Must be contained by the [`range`](#CallHierarchyItem.range).
*/
SelectionRange Range `json:"selectionRange"`
}
/**
* Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
*
* @since 3.16.0 - Proposed state
*/
type CallHierarchyOutgoingCall struct {
/**
* The item that is called.
*/
To CallHierarchyItem `json:"to"`
/**
* The range at which this item is called. This is the range relative to the caller, e.g the item
* passed to [`provideCallHierarchyOutgoingCalls`](#CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls)
* and not [`this.to`](#CallHierarchyOutgoingCall.to).
*/
FromRanges []Range `json:"fromRanges"`
}
/**
* The parameter of a `callHierarchy/outgoingCalls` request.
*
* @since 3.16.0 - Proposed state
*/
type CallHierarchyOutgoingCallsParams struct {
Item CallHierarchyItem `json:"item"`
WorkDoneProgressParams
PartialResultParams
}
/**
* The parameter of a `textDocument/prepareCallHierarchy` request.
*
* @since 3.16.0 - Proposed state
*/
type CallHierarchyPrepareParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
}
type CancelParams struct {
/**
* The request id to cancel.
*/
ID interface{} /*number | string*/ `json:"id"`
}
type ClientCapabilities = struct {
Workspace struct {
/**
* Workspace specific client capabilities.
*/
WorkspaceClientCapabilities
/**
* The client has support for workspace folders
*
* @since 3.6.0
*/
WorkspaceFolders bool `json:"workspaceFolders,omitempty"`
/**
* The client supports `workspace/configuration` requests.
*
* @since 3.6.0
*/
Configuration bool `json:"configuration,omitempty"`
}
/**
* Text document specific client capabilities.
*/
TextDocument TextDocumentClientCapabilities `json:"textDocument,omitempty"`
Window struct {
/**
* Window specific client capabilities.
*/
Window interface{} `json:"window,omitempty"`
/**
* Whether client supports handling progress notifications. If set servers are allowed to
* report in `workDoneProgress` property in the request specific server capabilities.
*
* Since 3.15.0
*/
WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
}
/**
* Experimental client capabilities.
*/
Experimental interface{} `json:"experimental,omitempty"`
}
/**
* A code action represents a change that can be performed in code, e.g. to fix a problem or
* to refactor code.
*
* A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed.
*/
type CodeAction struct {
/**
* A short, human-readable, title for this code action.
*/
Title string `json:"title"`
/**
* The kind of the code action.
*
* Used to filter code actions.
*/
Kind CodeActionKind `json:"kind,omitempty"`
/**
* The diagnostics that this code action resolves.
*/
Diagnostics []Diagnostic `json:"diagnostics,omitempty"`
/**
* Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
* by keybindings.
*
* A quick fix should be marked preferred if it properly addresses the underlying error.
* A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
*
* @since 3.15.0
*/
IsPreferred bool `json:"isPreferred,omitempty"`
/**
* The workspace edit this code action performs.
*/
Edit WorkspaceEdit `json:"edit,omitempty"`
/**
* A command this code action executes. If a code action
* provides a edit and a command, first the edit is
* executed and then the command.
*/
Command *Command `json:"command,omitempty"`
}
/**
* The Client Capabilities of a [CodeActionRequest](#CodeActionRequest).
*/
type CodeActionClientCapabilities struct {
/**
* Whether code action supports dynamic registration.
*/
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
/**
* The client support code action literals as a valid
* response of the `textDocument/codeAction` request.
*
* @since 3.8.0
*/
CodeActionLiteralSupport struct {
/**
* The code action kind is support with the following value
* set.
*/
CodeActionKind struct {
/**
* The code action kind values the client supports. When this
* property exists the client also guarantees that it will
* handle values outside its set gracefully and falls back
* to a default value when unknown.
*/
ValueSet []CodeActionKind `json:"valueSet"`
} `json:"codeActionKind"`
} `json:"codeActionLiteralSupport,omitempty"`
/**
* Whether code action supports the `isPreferred` property.
* @since 3.15.0
*/
IsPreferredSupport bool `json:"isPreferredSupport,omitempty"`
}
/**
* Contains additional diagnostic information about the context in which
* a [code action](#CodeActionProvider.provideCodeActions) is run.
*/
type CodeActionContext struct {
/**
* An array of diagnostics known on the client side overlapping the range provided to the
* `textDocument/codeAction` request. They are provied so that the server knows which
* errors are currently presented to the user for the given range. There is no guarantee
* that these accurately reflect the error state of the resource. The primary parameter
* to compute code actions is the provided range.
*/
Diagnostics []Diagnostic `json:"diagnostics"`
/**
* Requested kind of actions to return.
*
* Actions not of this kind are filtered out by the client before being shown. So servers
* can omit computing them.
*/
Only []CodeActionKind `json:"only,omitempty"`
}
/**
* A set of predefined code action kinds
*/
type CodeActionKind string
/**
* Provider options for a [CodeActionRequest](#CodeActionRequest).
*/
type CodeActionOptions struct {
/**
* CodeActionKinds that this server may return.
*
* The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
* may list out every specific kind they provide.
*/
CodeActionKinds []CodeActionKind `json:"codeActionKinds,omitempty"`
WorkDoneProgressOptions
}
/**
* The parameters of a [CodeActionRequest](#CodeActionRequest).
*/
type CodeActionParams struct {
/**
* The document in which the command was invoked.
*/
TextDocument TextDocumentIdentifier `json:"textDocument"`
/**
* The range for which the command was invoked.
*/
Range Range `json:"range"`
/**
* Context carrying additional information.
*/
Context CodeActionContext `json:"context"`
WorkDoneProgressParams
PartialResultParams
}
/**
* A code lens represents a [command](#Command) that should be shown along with
* source text, like the number of references, a way to run tests, etc.
*
* A code lens is _unresolved_ when no command is associated to it. For performance
* reasons the creation of a code lens and resolving should be done to two stages.
*/
type CodeLens struct {
/**
* The range in which this code lens is valid. Should only span a single line.
*/
Range Range `json:"range"`
/**
* The command this code lens represents.
*/
Command Command `json:"command,omitempty"`
/**
* An data entry field that is preserved on a code lens item between
* a [CodeLensRequest](#CodeLensRequest) and a [CodeLensResolveRequest]
* (#CodeLensResolveRequest)
*/
Data interface{} `json:"data,omitempty"`
}
/**
* The client capabilities of a [CodeLensRequest](#CodeLensRequest).
*/
type CodeLensClientCapabilities struct {
/**
* Whether code lens supports dynamic registration.
*/
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
}
/**
* Code Lens provider options of a [CodeLensRequest](#CodeLensRequest).
*/
type CodeLensOptions struct {
/**
* Code lens has a resolve provider as well.
*/
ResolveProvider bool `json:"resolveProvider,omitempty"`
WorkDoneProgressOptions
}
/**
* The parameters of a [CodeLensRequest](#CodeLensRequest).
*/
type CodeLensParams struct {
/**
* The document to request code lens for.
*/
TextDocument TextDocumentIdentifier `json:"textDocument"`
WorkDoneProgressParams
PartialResultParams
}
/**
* Represents a color in RGBA space.
*/
type Color struct {
/**
* The red component of this color in the range [0-1].
*/
Red float64 `json:"red"`
/**
* The green component of this color in the range [0-1].
*/
Green float64 `json:"green"`
/**
* The blue component of this color in the range [0-1].
*/
Blue float64 `json:"blue"`
/**
* The alpha component of this color in the range [0-1].
*/
Alpha float64 `json:"alpha"`
}
/**
* Represents a color range from a document.
*/
type ColorInformation struct {
/**
* The range in the document where this color appers.
*/
Range Range `json:"range"`
/**
* The actual color value for this color range.
*/
Color Color `json:"color"`
}
type ColorPresentation struct {
/**
* The label of this color presentation. It will be shown on the color
* picker header. By default this is also the text that is inserted when selecting
* this color presentation.
*/
Label string `json:"label"`
/**
* An [edit](#TextEdit) which is applied to a document when selecting
* this presentation for the color. When `falsy` the [label](#ColorPresentation.label)
* is used.
*/
TextEdit TextEdit `json:"textEdit,omitempty"`
/**
* An optional array of additional [text edits](#TextEdit) that are applied when
* selecting this color presentation. Edits must not overlap with the main [edit](#ColorPresentation.textEdit) nor with themselves.
*/
AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"`
}
/**
* Parameters for a [ColorPresentationRequest](#ColorPresentationRequest).
*/
type ColorPresentationParams struct {
/**
* The text document.
*/
TextDocument TextDocumentIdentifier `json:"textDocument"`
/**
* The color to request presentations for.
*/
Color Color `json:"color"`
/**
* The range where the color would be inserted. Serves as a context.
*/
Range Range `json:"range"`
WorkDoneProgressParams
PartialResultParams
}
/**
* Represents a reference to a command. Provides a title which
* will be used to represent a command in the UI and, optionally,
* an array of arguments which will be passed to the command handler
* function when invoked.
*/
type Command struct {
/**
* Title of the command, like `save`.
*/
Title string `json:"title"`
/**
* The identifier of the actual command handler.
*/
Command string `json:"command"`
/**
* Arguments that the command handler should be
* invoked with.
*/
Arguments []interface{} `json:"arguments,omitempty"`
}
/**
* Completion client capabilities
*/
type CompletionClientCapabilities struct {
/**
* Whether completion supports dynamic registration.
*/
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
/**
* The client supports the following `CompletionItem` specific
* capabilities.
*/
CompletionItem struct {
/**
* 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 bool `json:"snippetSupport,omitempty"`
/**
* Client supports commit characters on a completion item.
*/
CommitCharactersSupport bool `json:"commitCharactersSupport,omitempty"`
/**
* Client supports the follow content formats for the documentation
* property. The order describes the preferred format of the client.
*/
DocumentationFormat []MarkupKind `json:"documentationFormat,omitempty"`
/**
* Client supports the deprecated property on a completion item.
*/
DeprecatedSupport bool `json:"deprecatedSupport,omitempty"`
/**
* Client supports the preselect property on a completion item.
*/
PreselectSupport bool `json:"preselectSupport,omitempty"`
/**
* Client supports the tag property on a completion item. Clients supporting
* tags have to handle unknown tags gracefully. Clients especially need to
* preserve unknown tags when sending a completion item back to the server in
* a resolve call.
*
* @since 3.15.0
*/
TagSupport struct {
/**
* The tags supported by the client.
*/
ValueSet []CompletionItemTag `json:"valueSet"`
} `json:"tagSupport,omitempty"`
/**
* Client support insert replace edit to control different behavior if a
* completion item is inserted in the text or should replace text.
*
* @since 3.16.0 - Proposed state
*/
InsertReplaceSupport bool `json:"insertReplaceSupport,omitempty"`
} `json:"completionItem,omitempty"`
CompletionItemKind struct {
/**
* The completion item kind values the client supports. When this
* property exists the client also guarantees that it will
* handle values outside its set gracefully and falls back
* to a default value when unknown.
*
* If this property is not present the client only supports
* the completion items kinds from `Text` to `Reference` as defined in
* the initial version of the protocol.
*/
ValueSet []CompletionItemKind `json:"valueSet,omitempty"`
} `json:"completionItemKind,omitempty"`
/**
* The client supports to send additional context information for a
* `textDocument/completion` requestion.
*/
ContextSupport bool `json:"contextSupport,omitempty"`
}
/**
* Contains additional information about the context in which a completion request is triggered.
*/
type CompletionContext struct {
/**
* How the completion was triggered.
*/
TriggerKind CompletionTriggerKind `json:"triggerKind"`
/**
* The trigger character (a single character) that has trigger code complete.
* Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`
*/
TriggerCharacter string `json:"triggerCharacter,omitempty"`
}
/**
* A completion item represents a text snippet that is
* proposed to complete text that is being typed.
*/
type CompletionItem struct {
/**
* The label of this completion item. By default
* also the text that is inserted when selecting
* this completion.
*/
Label string `json:"label"`
/**
* The kind of this completion item. Based of the kind
* an icon is chosen by the editor.
*/
Kind CompletionItemKind `json:"kind,omitempty"`
/**
* Tags for this completion item.
*
* @since 3.15.0
*/
Tags []CompletionItemTag `json:"tags,omitempty"`
/**
* A human-readable string with additional information
* about this item, like type or symbol information.
*/
Detail string `json:"detail,omitempty"`
/**
* A human-readable string that represents a doc-comment.
*/
Documentation string/*string | MarkupContent*/ `json:"documentation,omitempty"`
/**
* Indicates if this item is deprecated.
* @deprecated Use `tags` instead.
*/
Deprecated bool `json:"deprecated,omitempty"`
/**
* Select this item when showing.
*
* *Note* that only one completion item can be selected and that the
* tool / client decides which item that is. The rule is that the *first*
* item of those that match best is selected.
*/
Preselect bool `json:"preselect,omitempty"`
/**
* A string that should be used when comparing this item
* with other items. When `falsy` the [label](#CompletionItem.label)
* is used.
*/
SortText string `json:"sortText,omitempty"`
/**
* A string that should be used when filtering a set of
* completion items. When `falsy` the [label](#CompletionItem.label)
* is used.
*/
FilterText string `json:"filterText,omitempty"`
/**
* A string that should be inserted into a document when selecting
* this completion. When `falsy` the [label](#CompletionItem.label)
* is used.
*
* The `insertText` is subject to interpretation by the client side.
* Some tools might not take the string literally. For example
* VS Code when code complete is requested in this example `con<cursor position>`
* and a completion item with an `insertText` of `console` is provided it
* will only insert `sole`. Therefore it is recommended to use `textEdit` instead
* since it avoids additional client side interpretation.
*/
InsertText string `json:"insertText,omitempty"`
/**
* The format of the insert text. The format applies to both the `insertText` property
* and the `newText` property of a provided `textEdit`. If ommitted defaults to
* `InsertTextFormat.PlainText`.
*/
InsertTextFormat InsertTextFormat `json:"insertTextFormat,omitempty"`
/**
* An [edit](#TextEdit) which is applied to a document when selecting
* this completion. When an edit is provided the value of
* [insertText](#CompletionItem.insertText) is ignored.
*
* *Note:* The text edit's range as well as both ranges from a insert replace edit must be a
* [single line] and they must contain the position at which completion has been requested.
*
* @since 3.16.0 additional type `InsertReplaceEdit` - Proposed state
*/
TextEdit *TextEdit/*TextEdit | InsertReplaceEdit*/ `json:"textEdit,omitempty"`
/**
* An optional array of additional [text edits](#TextEdit) that are applied when
* selecting this completion. Edits must not overlap (including the same insert position)
* with the main [edit](#CompletionItem.textEdit) nor with themselves.
*
* Additional text edits should be used to change text unrelated to the current cursor position
* (for example adding an import statement at the top of the file if the completion item will
* insert an unqualified type).
*/
AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitempty"`
/**
* An optional set of characters that when pressed while this completion is active will accept it first and
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
* characters will be ignored.
*/
CommitCharacters []string `json:"commitCharacters,omitempty"`
/**
* An optional [command](#Command) that is executed *after* inserting this completion. *Note* that
* additional modifications to the current document should be described with the
* [additionalTextEdits](#CompletionItem.additionalTextEdits)-property.
*/
Command *Command `json:"command,omitempty"`
/**
* An data entry field that is preserved on a completion item between
* a [CompletionRequest](#CompletionRequest) and a [CompletionResolveRequest]
* (#CompletionResolveRequest)
*/
Data interface{} `json:"data,omitempty"`
}
/**
* The kind of a completion entry.
*/
type CompletionItemKind float64
/**
* Completion item tags are extra annotations that tweak the rendering of a completion
* item.
*
* @since 3.15.0
*/
type CompletionItemTag float64
/**
* Represents a collection of [completion items](#CompletionItem) to be presented
* in the editor.
*/
type CompletionList struct {
/**
* This list it not complete. Further typing results in recomputing this list.
*/
IsIncomplete bool `json:"isIncomplete"`
/**
* The completion items.
*/
Items []CompletionItem `json:"items"`
}
/**
* Completion options.
*/
type CompletionOptions struct {
/**
* Most tools trigger completion request automatically without explicitly requesting
* it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
* starts to type an identifier. For example if the user types `c` in a JavaScript file
* code complete will automatically pop up present `console` besides others as a
* completion item. Characters that make up identifiers don't need to be listed here.
*
* If code complete should automatically be trigger on characters not being valid inside
* an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
*/
TriggerCharacters []string `json:"triggerCharacters,omitempty"`
/**
* The list of all possible characters that commit a completion. This field can be used
* if clients don't support individual commmit characters per completion item. See
* `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
*
* If a server provides both `allCommitCharacters` and commit characters on an individual
* completion item the ones on the completion item win.
*
* @since 3.2.0
*/
AllCommitCharacters []string `json:"allCommitCharacters,omitempty"`
/**
* The server provides support to resolve additional
* information for a completion item.
*/
ResolveProvider bool `json:"resolveProvider,omitempty"`
WorkDoneProgressOptions
}
/**
* Completion parameters
*/
type CompletionParams struct {
/**
* The completion context. This is only available it the client specifies
* to send this using the client capability `textDocument.completion.contextSupport === true`
*/
Context CompletionContext `json:"context,omitempty"`
TextDocumentPositionParams
WorkDoneProgressParams
PartialResultParams
}
/**
* How a completion was triggered
*/
type CompletionTriggerKind float64
type ConfigurationClientCapabilities struct {
/**
* The workspace client capabilities
*/
Workspace WorkspaceGn `json:"workspace,omitempty"`
}
type ConfigurationItem struct {
/**
* The scope to get the configuration section for.
*/
ScopeURI string `json:"scopeUri,omitempty"`
/**
* The configuration section asked for.
*/
Section string `json:"section,omitempty"`
}
/**
* The parameters of a configuration request.
*/
type ConfigurationParams struct {
Items []ConfigurationItem `json:"items"`
}
/**
* Create file operation.
*/
type CreateFile struct {
/**
* A create
*/
Kind string `json:"kind"`
/**
* The resource to create.
*/
URI DocumentURI `json:"uri"`
/**
* Additional options
*/
Options CreateFileOptions `json:"options,omitempty"`
ResourceOperation
}
/**
* Options to create a file.
*/
type CreateFileOptions struct {
/**
* Overwrite existing file. Overwrite wins over `ignoreIfExists`
*/
Overwrite bool `json:"overwrite,omitempty"`
/**
* Ignore if exists.
*/
IgnoreIfExists bool `json:"ignoreIfExists,omitempty"`
}
/**
* The declaration of a symbol representation as one or many [locations](#Location).
*/
type Declaration = []Location /*Location | Location[]*/
/**
* Since 3.14.0
*/
type DeclarationClientCapabilities struct {
/**
* Whether declaration supports dynamic registration. If this is set to `true`
* the client supports the new `DeclarationRegistrationOptions` return value
* for the corresponding server capability as well.
*/
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
/**
* The client supports additional metadata in the form of declaration links.
*/
LinkSupport bool `json:"linkSupport,omitempty"`
}
/**
* Information about where a symbol is declared.
*
* Provides additional metadata over normal [location](#Location) declarations, including the range of
* the declaring symbol.
*
* Servers should prefer returning `DeclarationLink` over `Declaration` if supported
* by the client.
*/
type DeclarationLink = LocationLink
type DeclarationOptions struct {
WorkDoneProgressOptions
}
type DeclarationParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
PartialResultParams
}
type DeclarationRegistrationOptions struct {
DeclarationOptions
TextDocumentRegistrationOptions
StaticRegistrationOptions
}
/**
* The definition of a symbol represented as one or many [locations](#Location).
* For most programming languages there is only one location at which a symbol is
* defined.
*
* Servers should prefer returning `DefinitionLink` over `Definition` if supported
* by the client.
*/
type Definition = []Location /*Location | Location[]*/
/**
* Client Capabilities for a [DefinitionRequest](#DefinitionRequest).
*/
type DefinitionClientCapabilities struct {
/**
* Whether definition supports dynamic registration.
*/
DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
/**
* The client supports additional metadata in the form of definition links.
*
* @since 3.14.0
*/
LinkSupport bool `json:"linkSupport,omitempty"`
}
/**
* Information about where a symbol is defined.
*
* Provides additional metadata over normal [location](#Location) definitions, including the range of
* the defining symbol
*/
type DefinitionLink = LocationLink
/**
* Server Capabilities for a [DefinitionRequest](#DefinitionRequest).
*/
type DefinitionOptions struct {
WorkDoneProgressOptions
}
/**
* Parameters for a [DefinitionRequest](#DefinitionRequest).
*/
type DefinitionParams struct {
TextDocumentPositionParams
WorkDoneProgressParams
PartialResultParams
}
/**
* Delete file operation
*/
type DeleteFile struct {
/**
* A delete
*/
Kind string `json:"kind"`
/**
* The file to delete.
*/
URI DocumentURI `json:"uri"`
/**
* Delete options.
*/
Options DeleteFileOptions `json:"options,omitempty"`
ResourceOperation
}
/**
* Delete file options
*/
type DeleteFileOptions struct {
/**
* Delete the content recursively if a folder is denoted.
*/
Recursive bool `json:"recursive,omitempty"`
/**
* Ignore the operation if the file doesn't exist.
*/
IgnoreIfNotExists bool `json:"ignoreIfNotExists,omitempty"`
}
/**
* Represents a diagnostic, such as a compiler error or warning. Diagnostic objects
* are only valid in the scope of a resource.
*/
type Diagnostic struct {
/**
* The range at which the message applies
*/
Range Range `json:"range"`
/**
* The diagnostic's severity. Can be omitted. If omitted it is up to the
* client to interpret diagnostics as error, warning, info or hint.
*/
Severity DiagnosticSeverity `json:"severity,omitempty"`
/**
* The diagnostic's code, which usually appear in the user interface.
*
* @since 3.16.0 Support for `DiagnosticCode` - Proposed state
*/
Code interface{}/* float64 | string | DiagnosticCode*/ `json:"code,omitempty"`
/**
* A human-readable string describing the source of this
* diagnostic, e.g. 'typescript' or 'super lint'. It usually