-
Notifications
You must be signed in to change notification settings - Fork 5
/
structures.scala
7876 lines (6393 loc) · 244 KB
/
structures.scala
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 2022 Neandertech
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package langoustine.lsp
package structures
import langoustine.*
import upickle.default.*
import json.{*, given}
import runtime.{*, given}
// format: off
/**
* A special text edit with an additional change annotation.
*
* @since 3.16.0.
* @param annotationId
* The actual identifier of the change annotation
* @param range
* The range of the text document to be manipulated. To insert
* text into a document create a range where start === end.
* @param newText
* The string to be inserted. For delete operations use an
* empty string.
*/
case class AnnotatedTextEdit(
annotationId: aliases.ChangeAnnotationIdentifier,
range: structures.Range,
newText: String
)
object AnnotatedTextEdit extends codecs.structures_AnnotatedTextEditCodec
/**
* The parameters passed via an apply workspace edit request.
* @param label
* 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.
* @param edit
* The edits to apply.
*/
case class ApplyWorkspaceEditParams(
label: Opt[String] = Opt.empty,
edit: structures.WorkspaceEdit
)
object ApplyWorkspaceEditParams extends codecs.structures_ApplyWorkspaceEditParamsCodec
/**
* The result returned from the apply workspace edit request.
*
* @since 3.17 renamed from ApplyWorkspaceEditResponse
* @param applied
* Indicates whether the edit was applied or not.
* @param failureReason
* 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.
* @param failedChange
* 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.
*/
case class ApplyWorkspaceEditResult(
applied: Boolean,
failureReason: Opt[String] = Opt.empty,
failedChange: Opt[runtime.uinteger] = Opt.empty
)
object ApplyWorkspaceEditResult extends codecs.structures_ApplyWorkspaceEditResultCodec
/**
* A base for all symbol information.
* @param name
* The name of this symbol.
* @param kind
* The kind of this symbol.
* @param tags
* Tags for this symbol.
*
* since 3.16.0
* @param containerName
* The name of the symbol containing this symbol. This information is for
* user interface purposes (e.g. to render a qualifier in the user interface
* if necessary). It can't be used to re-infer a hierarchy for the document
* symbols.
*/
case class BaseSymbolInformation(
name: String,
kind: enumerations.SymbolKind,
tags: Opt[Vector[enumerations.SymbolTag]] = Opt.empty,
containerName: Opt[String] = Opt.empty
)
object BaseSymbolInformation extends codecs.structures_BaseSymbolInformationCodec
/**
* @since 3.16.0
* @param dynamicRegistration
* Whether implementation supports dynamic registration. If this is set to `true`
* the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
* return value for the corresponding server capability as well.
*/
case class CallHierarchyClientCapabilities(
dynamicRegistration: Opt[Boolean] = Opt.empty
)
object CallHierarchyClientCapabilities extends codecs.structures_CallHierarchyClientCapabilitiesCodec
/**
* Represents an incoming call, e.g. a caller of a method or constructor.
*
* @since 3.16.0
* @param from
* The item that makes the call.
* @param fromRanges
* The ranges at which the calls appear. This is relative to the caller
* denoted by {@link CallHierarchyIncomingCall.from `this.from`}.
*/
case class CallHierarchyIncomingCall(
from: structures.CallHierarchyItem,
fromRanges: Vector[structures.Range]
)
object CallHierarchyIncomingCall extends codecs.structures_CallHierarchyIncomingCallCodec
/**
* The parameter of a `callHierarchy/incomingCalls` request.
*
* @since 3.16.0
* @param item
* @param workDoneToken
* An optional token that a server can use to report work done progress.
* @param partialResultToken
* An optional token that a server can use to report partial results (e.g. streaming) to
* the client.
*/
case class CallHierarchyIncomingCallsParams(
item: structures.CallHierarchyItem,
workDoneToken: Opt[aliases.ProgressToken] = Opt.empty,
partialResultToken: Opt[aliases.ProgressToken] = Opt.empty
)
object CallHierarchyIncomingCallsParams extends codecs.structures_CallHierarchyIncomingCallsParamsCodec
/**
* Represents programming constructs like functions or constructors in the context
* of call hierarchy.
*
* @since 3.16.0
* @param name
* The name of this item.
* @param kind
* The kind of this item.
* @param tags
* Tags for this item.
* @param detail
* More detail for this item, e.g. the signature of a function.
* @param uri
* The resource identifier of this item.
* @param range
* The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.
* @param selectionRange
* 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 {@link CallHierarchyItem.range `range`}.
* @param data
* A data entry field that is preserved between a call hierarchy prepare and
* incoming calls or outgoing calls requests.
*/
case class CallHierarchyItem(
name: String,
kind: enumerations.SymbolKind,
tags: Opt[Vector[enumerations.SymbolTag]] = Opt.empty,
detail: Opt[String] = Opt.empty,
uri: runtime.DocumentUri,
range: structures.Range,
selectionRange: structures.Range,
data: Opt[ujson.Value] = Opt.empty
)
object CallHierarchyItem extends codecs.structures_CallHierarchyItemCodec
/**
* Call hierarchy options used during static registration.
*
* @since 3.16.0
* @param workDoneProgress
*/
case class CallHierarchyOptions(
workDoneProgress: Opt[Boolean] = Opt.empty
)
object CallHierarchyOptions extends codecs.structures_CallHierarchyOptionsCodec
/**
* Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
*
* @since 3.16.0
* @param to
* The item that is called.
* @param fromRanges
* The range at which this item is called. This is the range relative to the caller, e.g the item
* passed to {@link CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls`}
* and not {@link CallHierarchyOutgoingCall.to `this.to`}.
*/
case class CallHierarchyOutgoingCall(
to: structures.CallHierarchyItem,
fromRanges: Vector[structures.Range]
)
object CallHierarchyOutgoingCall extends codecs.structures_CallHierarchyOutgoingCallCodec
/**
* The parameter of a `callHierarchy/outgoingCalls` request.
*
* @since 3.16.0
* @param item
* @param workDoneToken
* An optional token that a server can use to report work done progress.
* @param partialResultToken
* An optional token that a server can use to report partial results (e.g. streaming) to
* the client.
*/
case class CallHierarchyOutgoingCallsParams(
item: structures.CallHierarchyItem,
workDoneToken: Opt[aliases.ProgressToken] = Opt.empty,
partialResultToken: Opt[aliases.ProgressToken] = Opt.empty
)
object CallHierarchyOutgoingCallsParams extends codecs.structures_CallHierarchyOutgoingCallsParamsCodec
/**
* The parameter of a `textDocument/prepareCallHierarchy` request.
*
* @since 3.16.0
* @param textDocument
* The text document.
* @param position
* The position inside the text document.
* @param workDoneToken
* An optional token that a server can use to report work done progress.
*/
case class CallHierarchyPrepareParams(
textDocument: structures.TextDocumentIdentifier,
position: structures.Position,
workDoneToken: Opt[aliases.ProgressToken] = Opt.empty
)
object CallHierarchyPrepareParams extends codecs.structures_CallHierarchyPrepareParamsCodec
/**
* Call hierarchy options used during static or dynamic registration.
*
* @since 3.16.0
* @param documentSelector
* 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.
* @param id
* The id used to register the request. The id can be used to deregister
* the request again. See also Registration#id.
*/
case class CallHierarchyRegistrationOptions(
documentSelector: Opt[aliases.DocumentSelector],
id: Opt[String] = Opt.empty
)
object CallHierarchyRegistrationOptions extends codecs.structures_CallHierarchyRegistrationOptionsCodec
/**
* @param id
* The request id to cancel.
*/
case class CancelParams(
id: (Int | String)
)
object CancelParams extends codecs.structures_CancelParamsCodec
/**
* Additional information that describes document changes.
*
* @since 3.16.0
* @param label
* A human-readable string describing the actual change. The string
* is rendered prominent in the user interface.
* @param needsConfirmation
* A flag which indicates that user confirmation is needed
* before applying the change.
* @param description
* A human-readable string which is rendered less prominent in
* the user interface.
*/
case class ChangeAnnotation(
label: String,
needsConfirmation: Opt[Boolean] = Opt.empty,
description: Opt[String] = Opt.empty
)
object ChangeAnnotation extends codecs.structures_ChangeAnnotationCodec
/**
* Defines the capabilities provided by the client.
* @param workspace
* Workspace specific client capabilities.
* @param textDocument
* Text document specific client capabilities.
* @param notebookDocument
* Capabilities specific to the notebook document support.
*
* since 3.17.0
* @param window
* Window specific client capabilities.
* @param general
* General client capabilities.
*
* since 3.16.0
* @param experimental
* Experimental client capabilities.
*/
case class ClientCapabilities(
workspace: Opt[structures.WorkspaceClientCapabilities] = Opt.empty,
textDocument: Opt[structures.TextDocumentClientCapabilities] = Opt.empty,
notebookDocument: Opt[structures.NotebookDocumentClientCapabilities] = Opt.empty,
window: Opt[structures.WindowClientCapabilities] = Opt.empty,
general: Opt[structures.GeneralClientCapabilities] = Opt.empty,
experimental: Opt[ujson.Value] = Opt.empty
)
object ClientCapabilities extends codecs.structures_ClientCapabilitiesCodec
/**
* 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.
* @param title
* A short, human-readable, title for this code action.
* @param kind
* The kind of the code action.
*
* Used to filter code actions.
* @param diagnostics
* The diagnostics that this code action resolves.
* @param isPreferred
* 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
* @param disabled
* Marks that the code action cannot currently be applied.
*
* Clients should follow the following guidelines regarding disabled code actions:
*
* - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)
* code action menus.
*
* - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type
* of code action, such as refactorings.
*
* - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)
* that auto applies a code action and only disabled code actions are returned, the client should show the user an
* error message with `reason` in the editor.
*
* since 3.16.0
* @param edit
* The workspace edit this code action performs.
* @param command
* A command this code action executes. If a code action
* provides an edit and a command, first the edit is
* executed and then the command.
* @param data
* A data entry field that is preserved on a code action between
* a `textDocument/codeAction` and a `codeAction/resolve` request.
*
* since 3.16.0
*/
case class CodeAction(
title: String,
kind: Opt[enumerations.CodeActionKind] = Opt.empty,
diagnostics: Opt[Vector[structures.Diagnostic]] = Opt.empty,
isPreferred: Opt[Boolean] = Opt.empty,
disabled: Opt[CodeAction.Disabled] = Opt.empty,
edit: Opt[structures.WorkspaceEdit] = Opt.empty,
command: Opt[structures.Command] = Opt.empty,
data: Opt[ujson.Value] = Opt.empty
)
object CodeAction extends codecs.structures_CodeActionCodec:
/**
* @param reason
* Human readable description of why the code action is currently disabled.
*
* This is displayed in the code actions UI.
*/
case class Disabled(
reason: String
)
object Disabled extends codecs.structures_CodeAction_DisabledCodec
/**
* The Client Capabilities of a {@link CodeActionRequest}.
* @param dynamicRegistration
* Whether code action supports dynamic registration.
* @param codeActionLiteralSupport
* The client support code action literals of type `CodeAction` as a valid
* response of the `textDocument/codeAction` request. If the property is not
* set the request can only return `Command` literals.
*
* since 3.8.0
* @param isPreferredSupport
* Whether code action supports the `isPreferred` property.
*
* since 3.15.0
* @param disabledSupport
* Whether code action supports the `disabled` property.
*
* since 3.16.0
* @param dataSupport
* Whether code action supports the `data` property which is
* preserved between a `textDocument/codeAction` and a
* `codeAction/resolve` request.
*
* since 3.16.0
* @param resolveSupport
* Whether the client supports resolving additional code action
* properties via a separate `codeAction/resolve` request.
*
* since 3.16.0
* @param honorsChangeAnnotations
* Whether the client honors the change annotations in
* text edits and resource operations returned via the
* `CodeAction#edit` property by for example presenting
* the workspace edit in the user interface and asking
* for confirmation.
*
* since 3.16.0
*/
case class CodeActionClientCapabilities(
dynamicRegistration: Opt[Boolean] = Opt.empty,
codeActionLiteralSupport: Opt[CodeActionClientCapabilities.CodeActionLiteralSupport] = Opt.empty,
isPreferredSupport: Opt[Boolean] = Opt.empty,
disabledSupport: Opt[Boolean] = Opt.empty,
dataSupport: Opt[Boolean] = Opt.empty,
resolveSupport: Opt[CodeActionClientCapabilities.ResolveSupport] = Opt.empty,
honorsChangeAnnotations: Opt[Boolean] = Opt.empty
)
object CodeActionClientCapabilities extends codecs.structures_CodeActionClientCapabilitiesCodec:
/**
* @param codeActionKind
* The code action kind is support with the following value
* set.
*/
case class CodeActionLiteralSupport(
codeActionKind: CodeActionLiteralSupport.CodeActionKind
)
object CodeActionLiteralSupport extends codecs.structures_CodeActionClientCapabilities_CodeActionLiteralSupportCodec:
/**
* @param valueSet
* 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.
*/
case class CodeActionKind(
valueSet: Vector[enumerations.CodeActionKind]
)
object CodeActionKind extends codecs.structures_CodeActionClientCapabilities_CodeActionLiteralSupport_CodeActionKindCodec
/**
* @param properties
* The properties that a client can resolve lazily.
*/
case class ResolveSupport(
properties: Vector[String]
)
object ResolveSupport extends codecs.structures_CodeActionClientCapabilities_ResolveSupportCodec
/**
* Contains additional diagnostic information about the context in which
* a {@link CodeActionProvider.provideCodeActions code action} is run.
* @param diagnostics
* An array of diagnostics known on the client side overlapping the range provided to the
* `textDocument/codeAction` request. They are provided 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.
* @param only
* 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.
* @param triggerKind
* The reason why code actions were requested.
*
* since 3.17.0
*/
case class CodeActionContext(
diagnostics: Vector[structures.Diagnostic],
only: Opt[Vector[enumerations.CodeActionKind]] = Opt.empty,
triggerKind: Opt[enumerations.CodeActionTriggerKind] = Opt.empty
)
object CodeActionContext extends codecs.structures_CodeActionContextCodec
/**
* Provider options for a {@link CodeActionRequest}.
* @param codeActionKinds
* 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.
* @param resolveProvider
* The server provides support to resolve additional
* information for a code action.
*
* since 3.16.0
* @param workDoneProgress
*/
case class CodeActionOptions(
codeActionKinds: Opt[Vector[enumerations.CodeActionKind]] = Opt.empty,
resolveProvider: Opt[Boolean] = Opt.empty,
workDoneProgress: Opt[Boolean] = Opt.empty
)
object CodeActionOptions extends codecs.structures_CodeActionOptionsCodec
/**
* The parameters of a {@link CodeActionRequest}.
* @param textDocument
* The document in which the command was invoked.
* @param range
* The range for which the command was invoked.
* @param context
* Context carrying additional information.
* @param workDoneToken
* An optional token that a server can use to report work done progress.
* @param partialResultToken
* An optional token that a server can use to report partial results (e.g. streaming) to
* the client.
*/
case class CodeActionParams(
textDocument: structures.TextDocumentIdentifier,
range: structures.Range,
context: structures.CodeActionContext,
workDoneToken: Opt[aliases.ProgressToken] = Opt.empty,
partialResultToken: Opt[aliases.ProgressToken] = Opt.empty
)
object CodeActionParams extends codecs.structures_CodeActionParamsCodec
/**
* Registration options for a {@link CodeActionRequest}.
* @param documentSelector
* 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.
* @param codeActionKinds
* 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.
* @param resolveProvider
* The server provides support to resolve additional
* information for a code action.
*
* since 3.16.0
*/
case class CodeActionRegistrationOptions(
documentSelector: Opt[aliases.DocumentSelector],
codeActionKinds: Opt[Vector[enumerations.CodeActionKind]] = Opt.empty,
resolveProvider: Opt[Boolean] = Opt.empty
)
object CodeActionRegistrationOptions extends codecs.structures_CodeActionRegistrationOptionsCodec
/**
* Structure to capture a description for an error code.
*
* @since 3.16.0
* @param href
* An URI to open with more information about the diagnostic error.
*/
case class CodeDescription(
href: runtime.Uri
)
object CodeDescription extends codecs.structures_CodeDescriptionCodec
/**
* A code lens represents a {@link 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 in two stages.
* @param range
* The range in which this code lens is valid. Should only span a single line.
* @param command
* The command this code lens represents.
* @param data
* A data entry field that is preserved on a code lens item between
* a {@link CodeLensRequest} and a {@link CodeLensResolveRequest}
*/
case class CodeLens(
range: structures.Range,
command: Opt[structures.Command] = Opt.empty,
data: Opt[ujson.Value] = Opt.empty
)
object CodeLens extends codecs.structures_CodeLensCodec
/**
* The client capabilities of a {@link CodeLensRequest}.
* @param dynamicRegistration
* Whether code lens supports dynamic registration.
*/
case class CodeLensClientCapabilities(
dynamicRegistration: Opt[Boolean] = Opt.empty
)
object CodeLensClientCapabilities extends codecs.structures_CodeLensClientCapabilitiesCodec
/**
* Code Lens provider options of a {@link CodeLensRequest}.
* @param resolveProvider
* Code lens has a resolve provider as well.
* @param workDoneProgress
*/
case class CodeLensOptions(
resolveProvider: Opt[Boolean] = Opt.empty,
workDoneProgress: Opt[Boolean] = Opt.empty
)
object CodeLensOptions extends codecs.structures_CodeLensOptionsCodec
/**
* The parameters of a {@link CodeLensRequest}.
* @param textDocument
* The document to request code lens for.
* @param workDoneToken
* An optional token that a server can use to report work done progress.
* @param partialResultToken
* An optional token that a server can use to report partial results (e.g. streaming) to
* the client.
*/
case class CodeLensParams(
textDocument: structures.TextDocumentIdentifier,
workDoneToken: Opt[aliases.ProgressToken] = Opt.empty,
partialResultToken: Opt[aliases.ProgressToken] = Opt.empty
)
object CodeLensParams extends codecs.structures_CodeLensParamsCodec
/**
* Registration options for a {@link CodeLensRequest}.
* @param documentSelector
* 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.
* @param resolveProvider
* Code lens has a resolve provider as well.
*/
case class CodeLensRegistrationOptions(
documentSelector: Opt[aliases.DocumentSelector],
resolveProvider: Opt[Boolean] = Opt.empty
)
object CodeLensRegistrationOptions extends codecs.structures_CodeLensRegistrationOptionsCodec
/**
* @since 3.16.0
* @param refreshSupport
* Whether the client implementation supports a refresh request sent from the
* server to the client.
*
* Note that this event is global and will force the client to refresh all
* code lenses currently shown. It should be used with absolute care and is
* useful for situation where a server for example detect a project wide
* change that requires such a calculation.
*/
case class CodeLensWorkspaceClientCapabilities(
refreshSupport: Opt[Boolean] = Opt.empty
)
object CodeLensWorkspaceClientCapabilities extends codecs.structures_CodeLensWorkspaceClientCapabilitiesCodec
/**
* Represents a color in RGBA space.
* @param red
* The red component of this color in the range [0-1].
* @param green
* The green component of this color in the range [0-1].
* @param blue
* The blue component of this color in the range [0-1].
* @param alpha
* The alpha component of this color in the range [0-1].
*/
case class Color(
red: Float,
green: Float,
blue: Float,
alpha: Float
)
object Color extends codecs.structures_ColorCodec
/**
* Represents a color range from a document.
* @param range
* The range in the document where this color appears.
* @param color
* The actual color value for this color range.
*/
case class ColorInformation(
range: structures.Range,
color: structures.Color
)
object ColorInformation extends codecs.structures_ColorInformationCodec
/**
* @param label
* 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.
* @param textEdit
* An {@link TextEdit edit} which is applied to a document when selecting
* this presentation for the color. When `falsy` the {@link ColorPresentation.label label}
* is used.
* @param additionalTextEdits
* An optional array of additional {@link TextEdit text edits} that are applied when
* selecting this color presentation. Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor with themselves.
*/
case class ColorPresentation(
label: String,
textEdit: Opt[structures.TextEdit] = Opt.empty,
additionalTextEdits: Opt[Vector[structures.TextEdit]] = Opt.empty
)
object ColorPresentation extends codecs.structures_ColorPresentationCodec
/**
* Parameters for a {@link ColorPresentationRequest}.
* @param textDocument
* The text document.
* @param color
* The color to request presentations for.
* @param range
* The range where the color would be inserted. Serves as a context.
* @param workDoneToken
* An optional token that a server can use to report work done progress.
* @param partialResultToken
* An optional token that a server can use to report partial results (e.g. streaming) to
* the client.
*/
case class ColorPresentationParams(
textDocument: structures.TextDocumentIdentifier,
color: structures.Color,
range: structures.Range,
workDoneToken: Opt[aliases.ProgressToken] = Opt.empty,
partialResultToken: Opt[aliases.ProgressToken] = Opt.empty
)
object ColorPresentationParams extends codecs.structures_ColorPresentationParamsCodec
/**
* 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.
* @param title
* Title of the command, like `save`.
* @param command
* The identifier of the actual command handler.
* @param arguments
* Arguments that the command handler should be
* invoked with.
*/
case class Command(
title: String,
command: String,
arguments: Opt[Vector[ujson.Value]] = Opt.empty
)
object Command extends codecs.structures_CommandCodec
/**
* Completion client capabilities
* @param dynamicRegistration
* Whether completion supports dynamic registration.
* @param completionItem
* The client supports the following `CompletionItem` specific
* capabilities.
* @param completionItemKind
* @param insertTextMode
* Defines how the client handles whitespace and indentation
* when accepting a completion item that uses multi line
* text in either `insertText` or `textEdit`.
*
* since 3.17.0
* @param contextSupport
* The client supports to send additional context information for a
* `textDocument/completion` request.
* @param completionList
* The client supports the following `CompletionList` specific
* capabilities.
*
* since 3.17.0
*/
case class CompletionClientCapabilities(
dynamicRegistration: Opt[Boolean] = Opt.empty,
completionItem: Opt[CompletionClientCapabilities.CompletionItem] = Opt.empty,
completionItemKind: Opt[CompletionClientCapabilities.CompletionItemKind] = Opt.empty,
insertTextMode: Opt[enumerations.InsertTextMode] = Opt.empty,
contextSupport: Opt[Boolean] = Opt.empty,
completionList: Opt[CompletionClientCapabilities.CompletionList] = Opt.empty
)
object CompletionClientCapabilities extends codecs.structures_CompletionClientCapabilitiesCodec:
/**
* @param snippetSupport
* 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.
* @param commitCharactersSupport
* Client supports commit characters on a completion item.
* @param documentationFormat
* Client supports the following content formats for the documentation
* property. The order describes the preferred format of the client.
* @param deprecatedSupport
* Client supports the deprecated property on a completion item.
* @param preselectSupport
* Client supports the preselect property on a completion item.
* @param tagSupport
* 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
* @param insertReplaceSupport
* 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
* @param resolveSupport
* Indicates which properties a client can resolve lazily on a completion
* item. Before version 3.16.0 only the predefined properties `documentation`
* and `details` could be resolved lazily.
*
* since 3.16.0
* @param insertTextModeSupport
* The client supports the `insertTextMode` property on
* a completion item to override the whitespace handling mode
* as defined by the client (see `insertTextMode`).
*
* since 3.16.0
* @param labelDetailsSupport
* The client has support for completion item label
* details (see also `CompletionItemLabelDetails`).
*
* since 3.17.0
*/
case class CompletionItem(
snippetSupport: Opt[Boolean] = Opt.empty,