-
Notifications
You must be signed in to change notification settings - Fork 4
/
lsp.ol
963 lines (853 loc) · 23 KB
/
lsp.ol
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
/* MIT License
*
* Copyright (c) 2021 The Jolie Programming Language
* Copyright (c) 2022 Vicki Mixen <vicki@mixen.dk>
* Copyright (C) 2022 Fabrizio Montesi <famontesi@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.from console import Console
*/
/*
* Jolie types for the Language Server Protocol
* see https://microsoft.github.io/language-server-protocol/specification
*/
/*
* @author Eros Fabrici
*/
type InitializeParams {
processId: int | void
rootPath?: string | void
rootUri: DocumentUri | void
initializationOptions?: undefined
capabilities: ClientCapabilities
trace?: string // "off" | "messages" | "verbose"
workspaceFolders*: WorkspaceFolder | void
}
type WorkspaceFolder {
uri: string
name: string
}
type DocumentUri: string
type TextDocumentIdentifier {
uri: DocumentUri
}
type VersionedTextDocumentIdentifier {
uri: DocumentUri
version: int | void
}
type ClientCapabilities {
workspace?: WorkspaceClientCapabilities
textDocument?: TextDocumentClientCapabilities
experimental?: undefined
}
type WorkspaceClientCapabilities {
applyEdit?: bool
workspaceEdit? {
documentChanges?: bool
resourceOperations*: ResourceOperationKind
failureHandling?: FailureHandlingKind
}
didChangeConfiguration? {
dynamicRegistration?: bool
}
didChangeWatchedFiles? {
dynamicRegistration?: bool
}
symbol? {
dynamicRegistration?: bool
symbolKind? {
valueSet*: SymbolKind
}
}
executeCommand? {
dynamicRegistration?: bool
}
workspaceFolders?: bool
configuration?: bool
}
type ResourceOperationKind: string //namespace, see official spec
type FailureHandlingKind: string //namespace, see official spec
type MarkupKind: string //namespace, see official spec
type SymbolKind: int //namespace, see official spec
type CompletionItemKind: int // namespace, see official spec
type CodeActionKind: string //namespace, see official spec
type TextDocumentClientCapabilities {
synchronization? {
dynamicRegistration?: bool
willSave?: bool
willSaveWaitUntil?: bool
didSave?: bool
}
completion? {
dynamicRegistration?: bool
completionItem? {
snippetSupport?: bool
commitCharactersSupport?: bool
documentationFormat*: MarkupKind
deprecatedSupport?: bool
preselectSupport?: bool
}
completionItemKind? {
valueSet*: CompletionItemKind
}
contextSupport?: bool
}
hover? {
dynamicRegistration?: bool
contentFormat*: MarkupKind
}
signatureHelp? {
dynamicRegistration?: bool
signatureInformation? {
documentationFormat*: MarkupKind
parameterInformation? {
labelOffsetSupport?: bool
}
}
}
references? {
dynamicRegistration?: bool
}
documentHighlight? {
dynamicRegistration?: bool
}
documentSymbol? {
dynamicRegistration?: bool
symbolKind? {
valueSet*: SymbolKind
}
hierarchicalDocumentSymbolSupport?: bool
}
formatting? {
dynamicRegistration?: bool
}
rangeFormatting? {
dynamicRegistration?: bool
}
onTypeFormatting? {
dynamicRegistration?: bool
}
declaration? {
dynamicRegistration?: bool
linkSupport?: bool
}
definition? {
dynamicRegistration?: bool
linkSupport?: bool
}
typeDefinition? {
dynamicRegistration?: bool
linkSupport?: bool
}
implementation? {
dynamicRegistration?: bool
linkSupport?: bool
}
codeAction? {
dynamicRegistration?: bool
codeActionLiteralSupport? {
codeActionKind {
valueSet[1,*]: CodeActionKind
}
}
}
codeLens? {
dynamicRegistration?: bool
}
documentLink? {
dynamicRegistration?: bool
}
rename? {
dynamicRegistration?: bool
prepareSupport?: bool
}
publishDiagnostics? {
relatedInformation?: bool
}
foldingRange? {
dynamicRegistration?: bool
rangeLimit?: int
lineFoldingOnly?: bool
}
colorProvider? {
dynamicRegistration?: bool
}
}
type InitializedParams: void
type InitializeResult {
capabilities: ServerCapabilities
}
type ServerCapabilities {
textDocumentSync?: TextDocumentSyncOptions | int
hoverProvider?: bool
completionProvider?: CompletionOptions
signatureHelpProvider?: SignatureHelpOptions
definitionProvider?: bool
typeDefinitionProvider?: undefined //TODO see LSP specification
implementationProvider?: undefined //TODO see LSP specification
referenceProvider?: undefined //TODO see LSP specification
documentHighlightProvider?: bool
documentSymbolProvider?: bool
codeActionProvider?: CodeLensOptions
documentFormattingProvider?: bool
documentRangeFormattingProvider?: bool
documentOnTypeFormattingProvider?: DocumentOnTypeFormattingOptions
renameProvider?: bool | RenameOptions
documentLinkProvider?: DocumentLinkOptions
colorProvider?: undefined //TODO see LSP specification
foldingRangeProvider?: undefined //TODO see LSP specification
declarationProvider?: undefined //TODO see LSP specification
executeCommandProvider?: ExecuteCommandOptions
workspace? {
workspaceFolders? {
supported?: bool
changeNotifications?: string | bool
}
}
workspaceSymbolProvider?: bool
experimental?: undefined
codeLensProvider?: CodeLensOptions
}
type ExecuteCommandOptions {
/*
* The commands to be executed on the server
*/
commands[1,*]: string
}
type DocumentLinkOptions {
/*
* Document links have a resolve provider as well
*/
resolveProvider?: bool
}
type RenameOptions {
/*
* Renames should be checked and tested before being executed
*/
prepareProvider?: bool
}
type DocumentOnTypeFormattingOptions {
/*
* A character on which formatting should be triggered, like `}`
*/
firstTriggerCharacter: string
/*
* More trigger characters
*/
moreTriggerCharacter*: string
}
type CodeLensOptions {
/*
* Code lens has a resolve provider as well
*/
resolveProvider?: bool
}
type SignatureHelpOptions {
/*
* The characters that trigger signature help
* automatically
*/
triggerCharacters*: string
}
type ParameterInformation {
/*
* The label of this parameter information.
*
* Either a string or an inclusive start and exclusive end offsets within its containing
* signature label. (see SignatureInformation.label). The offsets are based on a UTF-16
* string representation as `Position` and `Range` does.
*
* *Note*: a label of type string should be a substring of its containing signature label.
* Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`.
*/
label: string | void { _2: int } //string | [int, int]
/*
* The human-readable doc-comment of this parameter. Will be shown
* in the UI but can be omitted.
*/
documentation?: string | MarkupContent
}
type SignatureInformation {
label: string
documentation?: string | MarkupContent
parameters*: ParameterInformation
}
type SignatureHelp {
signatures[1,*]: SignatureInformation
/*
* The active signature. If omitted or the value lies outside the
* range of `signatures` the value defaults to zero or is ignored if
* `signatures.length === 0`. Whenever possible implementors should
* make an active decision about the active signature and shouldn't
* rely on a default value.
* In future version of the protocol this property might become
* mandatory to better express this.
*/
activeSignature?: int
/*
* The active parameter of the active signature. If omitted or the value
* lies outside the range of `signatures[activeSignature].parameters`
* defaults to 0 if the active signature has parameters. If
* the active signature has no parameters it is ignored.
* In future version of the protocol this property might become
* mandatory to better express the active parameter if the
* active signature does have any.
*/
activeParameter?: int
}
type SignatureHelpResponse: SignatureHelp | void
type CompletionOptions {
/*
* The server provides support to resolve additional
* information for a completion item
*/
resolveProvider?: bool
/*
* The characters that trigger completion automatically
*/
triggerCharacters*: string
}
type TextDocumentSyncOptions {
/*
* Open and close notifications are sent to the server If omitted open close notification should not
* be sent
*/
openClose?: bool
/*
* Change notifications are sent to the server See TextDocumentSyncKindNone, TextDocumentSyncKindFull
* and TextDocumentSyncKindIncremental If omitted it defaults to TextDocumentSyncKindNone
*/
change?: int
/*
* If present will save notifications are sent to the server If omitted the notification should not be
* sent
*/
willSave?: bool
/*
* If present will save wait until requests are sent to the server If omitted the request should not be
* sent
*/
willSaveWaitUntil?: bool
/*
* If present save notifications are sent to the server If omitted the notification should not be
* sent
*/
save?: SaveOptions
}
type SaveOptions {
includeText?: bool
}
type DidOpenTextDocumentParams {
textDocument: TextDocumentItem
}
type TextDocumentItem {
/*
* The text document's URI
*/
uri: DocumentUri
/*
* The text document's language identifier
*/
languageId: string
/*
* The version number of this document (it will increase after each
* change, including undo/redo)
*/
version: int
/*
* The content of the opened text document
*/
text: string
}
type 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 The content changes describe single state changes
* to the document So if there are two content changes c1 and c2 for a document
* in state S then c1 move the document to S' and c2 to S''
*/
contentChanges[1,*]: TextDocumentContentChangeEvent
}
type TextDocumentContentChangeEvent {
/*
* The range of the document that changed
*/
range?: Range
/*
* The length of the range that got replaced
*/
rangeLength?: int
/*
* The new text of the range/document
*/
text: string
}
type Range {
start: Position
end: Position
}
type Position {
/*
* Line position in a document (zero-based)
*/
line: int
/*
* Character offset on a line in a document (zero-based) Assuming that the line is
* represented as a string, the `character` value represents the gap between the
* `character` and `character + 1`
*
* If the character value is greater than the line length it defaults back to the
* line length
*/
character: int
}
type WillSaveTextDocumentParams {
textDocument: TextDocumentIdentifier
reason: int // 1=Manual, 2=afterDelay, 3=FocusOut
}
type WillSaveWaitUntilResponse: TextEdit | void //TextEdit[1,*]
type DidSaveTextDocumentParams {
textDocument: VersionedTextDocumentIdentifier
text?: string
}
type DidCloseTextDocumentParams {
textDocument: TextDocumentIdentifier
}
type TextEdit {
range: Range
newText: string
}
type TextDocumentPositionParams {
textDocument: TextDocumentIdentifier
position: Position
}
type CompletionParams {
textDocument: TextDocumentIdentifier
position: Position
context?: CompletionContext
}
type CompletionContext {
/*
* How the completion was triggered
* CompletionTriggerKind: 1 = Invoked, 2 = TriggerCharacter,
* 3 = TriggerForIncompleteCompletions
*/
triggerKind: int
/*
* The trigger character (a single character) that has trigger code complete
* Is undefined if `triggerKind !== CompletionTriggerKindTriggerCharacter`
*/
triggerCharacter?: string
}
type EmptyCompletionList {
isIncomplete: bool
items: void
}
type CompletionResult: CompletionList | EmptyCompletionList | void
type CompletionList {
/*
* This list it not complete Further typing should result in recomputing
* this list
*/
isIncomplete: bool
/*
* The completion items
*/
items*: CompletionItem
}
type CompletionItem {
/*
* The label of this completion item By default
* also the text that is inserted when selecting
* this completion
*/
label: string
/*
* The kind of this completion item Based of the kind
* an icon is chosen by the editor The standardized set
* of available values is defined in `CompletionItemKind`
*/
kind?: int
/*
* A human-readable string with additional information
* about this item, like type or symbol information
*/
detail?: string
/*
* A human-readable string that represents a doc-comment
*/
documentation?: string | MarkupContent
/*
* Indicates if this item is deprecated
*/
deprecated?: bool
/*
* 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
/*
* A string that should be used when comparing this item
* with other items When `falsy` the label is used
*/
sortText?: string
/*
* A string that should be used when filtering a set of
* completion items When `falsy` the label is used
*/
filterText?: string
/*
* A string that should be inserted into a document when selecting
* this completion When `falsy` the 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
*
* @deprecated Use textEdit instead
*/
insertText?: string
/*
* The format of the insert text The format applies to both the `insertText` property
* and the `newText` property of a provided `textEdit`
*/
insertTextFormat?: int //namespace: 1 = plainText, 2 = Snippet
/*
* An edit which is applied to a document when selecting this completion When an edit is provided the value of
* `insertText` is ignored
*
* *Note:* The range of the edit must be a single line range and it must contain the position at which completion
* has been requested
*/
textEdit?: TextEdit
/*
* An optional array of additional text edits that are applied when
* selecting this completion Edits must not overlap (including the same insert position)
* with the main edit 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
/*
* 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
/*
* An optional command that is executed *after* inserting this completion *Note* that
* additional modifications to the current document should be described with the
* additionalTextEdits-property
*/
command?: Command
/*
* A data entry field that is preserved on a completion item between
* a completion and a completion resolve request
*/
data?: any
}
/*
* A `MarkupContent` literal represents a string value which content is interpreted base on its
* kind flag Currently the protocol supports `plaintext` and `markdown` as markup kinds
*
* If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues
* See https://helpgithubcom/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
*
* Here is an example how such a string can be constructed using JavaScript / TypeScript:
* ```typescript
* let markdown: MarkdownContent = {
* kind: MarkupKindMarkdown,
* value: [
* '# Header',
* 'Some text',
* '```typescript',ol INFO: [server.ol] [JSON-RPC debug] Receiving: {"jsonrpc":"2.
* 'someCode();',
* '```'
* ]join('\n')
* };
* ```
*
* *Please Note* that clients might sanitize the return markdown A client could decide to
* remove HTML from the markdown to avoid script execution
*/
type MarkupContent {
kind: undefined
value: string
}
type Command {
title: string
command: string
arguments*: undefined
}
type DidChangeWatchedFilesParams {
changes[1,*]: FileEvent
}
type FileEvent {
uri: DocumentUri
/*
* 1 = created, 2 = Changed, 3 = Deleted
*/
type: int
}
type DidChangeWorkspaceFoldersParams {
event: WorkspaceFolderChangeEvent
}
type WorkspaceFolderChangeEvent {
added[1,*]: WorkspaceFolder
removed[1,*]: WorkspaceFolder
}
type DidChangeConfigurationParams {
settings: undefined
}
type WorkspaceSymbolParams {
query: string
workDoneToken?: int | string
partialResultToken?: int | string
}
type WorkSpaceSymbolResponse {_*: SymbolInformation | WorkspaceSymbol}
type WorkspaceSymbol {
name: string
kind: SymbolKind
tags?: undefined
location: Location | DocumentUri
containerName?: string
}
type SymbolInformation {
/*
* The name of this symbol
*/
name: string
/*
* The kind of this symbol
*/
kind: int
/*
* Indicates if this symbol is deprecated
*/
deprecated?: bool
/*
* The location of this symbol The location's range is used by a tool
* to reveal the location in the editor If the symbol is selected in the
* tool the range's start information is used to position the cursor So
* the range usually spans more then the actual symbol's name and does
* normally include things like visibility modifiers
*
* The range doesn't have to denote a node range in the sense of a abstract
* syntax tree It can therefore not be used to re-construct a hierarchy of
* the symbols
*/
location: Location
/*
* The name of the symbol containing this symbol This information is for
* user interface purposes (eg to render a qualifier in the user interface
* if necessary) It can't be used to re-infer a hierarchy for the document
* symbols
*/
containerName?: string
}
type DocumentSymbolResult {
_*: SymbolInformation
}
type Location {
uri: DocumentUri
range: Range
}
type ExecuteCommandParams {
command: string
arguments*: undefined
}
type ExecuteCommandResult: undefined
type Hover {
contents[1,*]: MarkedString | MarkupContent
range?: Range
}
type HoverInformations: Hover | void
type DefinitionResponse: Location | void
type MarkedString: string | MarkSt
type MarkSt {
language: string
value: string
}
type DiagnosticParams {
uri: DocumentUri
diagnostics*: Diagnostic | void
}
type Diagnostic {
range: Range
severity?: int //1=error, 2=warn, 3=info, 4=hint
code?: int | string
source?: string
message: string
relatedInformation*: DiagnosticRelatedInformation
}
type DiagnosticRelatedInformation {
location: Location
message: string
}
type DocumentSymbolParams {
textDocument: TextDocumentIdentifier
}
type Snippet: string {
prefix: string
body: string
}
type TextDocument {
uri: string
lines*: string
source: string
version: int
jolieProgram?: undefined
}
type DocumentModifications {
version: int
uri: string
text: string
}
type DocumentData {
uri: string
text: string
}
type RenameRequest {
newName: string
textDocument {
uri: DocumentUri
}
position {
character: int
line: int
}
}
// https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#workspaceEdit
// workspaceEdit
/* type WorkspaceEditResponse {
changes? {
_uri*: DocumentUri {
_textEdit*: TextEdit
}
}
} */
//should be WorkspaceEditResponse
type RenameResponse: undefined | void
interface GeneralInterface {
OneWay:
initialized( InitializedParams ),
onExit( void ),
cancelRequest
RequestResponse:
initialize( InitializeParams )( InitializeResult ),
shutdown( void )( void )
}
interface GlobalVariables {
RequestResponse:
getRootUri(void)(DocumentUri)
}
interface TextDocumentInterface {
OneWay:
didOpen( DidOpenTextDocumentParams ),
didChange( DidChangeTextDocumentParams ),
willSave( WillSaveTextDocumentParams ),
didSave( DidSaveTextDocumentParams ),
didClose( DidCloseTextDocumentParams )
RequestResponse:
willSaveWaitUntil( WillSaveTextDocumentParams )( WillSaveWaitUntilResponse ),
completion( CompletionParams )( CompletionResult ),
hover( TextDocumentPositionParams )( HoverInformations ),
documentSymbol( DocumentSymbolParams )( DocumentSymbolResult ),
signatureHelp( TextDocumentPositionParams )( SignatureHelpResponse ),
definition(TextDocumentPositionParams)(DefinitionResponse),
rename(RenameRequest)(RenameResponse)
}
interface WorkspaceInterface {
OneWay:
didChangeWatchedFiles( DidChangeWatchedFilesParams ),
didChangeWorkspaceFolders( DidChangeWorkspaceFoldersParams ),
didChangeConfiguration( DidChangeConfigurationParams )
RequestResponse:
symbol( WorkspaceSymbolParams )( WorkSpaceSymbolResponse ),
executeCommand( ExecuteCommandParams )( ExecuteCommandResult )
}
interface ServerToClient {
OneWay:
publishDiagnostics( DiagnosticParams )
}
interface UtilsInterface {
RequestResponse:
getDocument( string )( TextDocument )
OneWay:
insertNewDocument( DidOpenTextDocumentParams ),
updateDocument( DocumentModifications ),
deleteDocument( DidCloseTextDocumentParams )
}
type CreationResponse {
filename: string
includePaths*: string
source: string
}
interface InspectionUtilsInterface {
RequestResponse:
inspectDocument( DocumentData )(undefined),
inspectDocumentReturnDiagnostics( DocumentData)( DiagnosticParams),
createMinimalInspectionRequest(DocumentData)(CreationResponse)
}
type CompletionImportSymbolRequest: any {
regexMatch*:string
txtDocUri:string
}
type CompletionImportSymbolResult: any {
result*:string
}
type CompletionImportModuleRequest: any {
regexMatch*:string
txtDocUri:string
}
type CompletionImportModuleResult: any {
result*:string
}
type CompletionOperationRequest: any {
codeLine:string
jolieProgram?:undefined
}
type CompletionOperationResult: any {
result*:CompletionItem
}
type CompletionKeywordRequest: any {
codeLine:string
}
type CompletionKeywordResult: any {
result*:CompletionItem
}
interface CompletionHelperInterface {
RequestResponse:
completionOperation(CompletionOperationRequest)(CompletionOperationResult),
completionKeywords(CompletionKeywordRequest)(CompletionKeywordResult),
completionImportModule(CompletionImportModuleRequest)(CompletionImportModuleResult),
completionImportSymbol(CompletionImportSymbolRequest)(CompletionImportSymbolResult)
}