1
+ [
2
+ {
3
+ "comment" : [
4
+ " This test checks that the completionItem/resolve request" ,
5
+ " does not fail on predefined types defined in the standard " ,
6
+ " package"
7
+ ]
8
+ },
9
+ {
10
+ "start" : {
11
+ "cmd" : [
12
+ " ${ALS}"
13
+ ]
14
+ }
15
+ },
16
+ {
17
+ "send" : {
18
+ "request" : {
19
+ "jsonrpc" : " 2.0" ,
20
+ "id" : 1 ,
21
+ "method" : " initialize" ,
22
+ "params" : {
23
+ "processId" : 422450 ,
24
+ "rootUri" : " $URI{.}" ,
25
+ "capabilities" : {
26
+ "workspace" : {
27
+ "applyEdit" : true ,
28
+ "workspaceEdit" : {
29
+ "documentChanges" : true ,
30
+ "resourceOperations" : [
31
+ " rename"
32
+ ]
33
+ }
34
+ },
35
+ "textDocument" : {
36
+ "synchronization" : {},
37
+ "completion" : {
38
+ "dynamicRegistration" : true ,
39
+ "completionItem" : {
40
+ "snippetSupport" : false ,
41
+ "documentationFormat" : [
42
+ " plaintext" ,
43
+ " markdown"
44
+ ],
45
+ "resolveSupport" : {
46
+ "properties" : [
47
+ " detail" ,
48
+ " documentation"
49
+ ]
50
+ }
51
+ }
52
+ },
53
+ "hover" : {},
54
+ "signatureHelp" : {},
55
+ "declaration" : {},
56
+ "definition" : {},
57
+ "typeDefinition" : {},
58
+ "implementation" : {},
59
+ "documentSymbol" : {
60
+ "hierarchicalDocumentSymbolSupport" : true
61
+ },
62
+ "formatting" : {
63
+ "dynamicRegistration" : false
64
+ },
65
+ "rangeFormatting" : {
66
+ "dynamicRegistration" : false
67
+ },
68
+ "onTypeFormatting" : {
69
+ "dynamicRegistration" : false
70
+ },
71
+ "foldingRange" : {
72
+ "lineFoldingOnly" : true
73
+ }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "wait" : [
79
+ {
80
+ "id" : 1 ,
81
+ "result" : {
82
+ "capabilities" : {
83
+ "textDocumentSync" : 2 ,
84
+ "completionProvider" : {
85
+ "triggerCharacters" : [
86
+ " ." ,
87
+ " ," ,
88
+ " '" ,
89
+ " ("
90
+ ],
91
+ "resolveProvider" : true
92
+ },
93
+ "hoverProvider" : true ,
94
+ "signatureHelpProvider" : {
95
+ "triggerCharacters" : [
96
+ " ," ,
97
+ " ("
98
+ ],
99
+ "retriggerCharacters" : [
100
+ " \b "
101
+ ]
102
+ },
103
+ "declarationProvider" : true ,
104
+ "definitionProvider" : true ,
105
+ "typeDefinitionProvider" : true ,
106
+ "implementationProvider" : true ,
107
+ "referencesProvider" : true ,
108
+ "documentHighlightProvider" : true ,
109
+ "documentSymbolProvider" : true ,
110
+ "codeActionProvider" : {},
111
+ "documentFormattingProvider" : true ,
112
+ "renameProvider" : {},
113
+ "foldingRangeProvider" : true ,
114
+ "executeCommandProvider" : {
115
+ "commands" : [
116
+ " als-other-file" ,
117
+ " als-named-parameters" ,
118
+ " als-refactor-imports" ,
119
+ " als-suppress-separate" ,
120
+ " als-refactor-extract-subprogram" ,
121
+ " als-refactor-pull_up_declaration" ,
122
+ " als-refactor-add-parameters" ,
123
+ " als-refactor-remove-parameters" ,
124
+ " als-refactor-move-parameter" ,
125
+ " als-refactor-change-parameter-mode" ,
126
+ " als-refactor-change_parameters_type" ,
127
+ " als-refactor-change_parameters_default_value"
128
+ ]
129
+ },
130
+ "workspaceSymbolProvider" : true ,
131
+ "callHierarchyProvider" : {},
132
+ "alsShowDepsProvider" : true ,
133
+ "alsReferenceKinds" : [
134
+ " reference" ,
135
+ " access" ,
136
+ " write" ,
137
+ " call" ,
138
+ " dispatching call" ,
139
+ " parent" ,
140
+ " child" ,
141
+ " overriding"
142
+ ],
143
+ "alsCheckSyntaxProvider" : true
144
+ }
145
+ }
146
+ }
147
+ ]
148
+ }
149
+ },
150
+ {
151
+ "send" : {
152
+ "request" : {
153
+ "jsonrpc" : " 2.0" ,
154
+ "method" : " initialized"
155
+ },
156
+ "wait" : []
157
+ }
158
+ },
159
+ {
160
+ "send" : {
161
+ "request" : {
162
+ "jsonrpc" : " 2.0" ,
163
+ "method" : " workspace/didChangeConfiguration" ,
164
+ "params" : {
165
+ "settings" : {
166
+ "ada" : {
167
+ "scenarioVariables" : {},
168
+ "defaultCharset" : " ISO-8859-1" ,
169
+ "enableDiagnostics" : false ,
170
+ "followSymlinks" : false ,
171
+ "documentationStyle" : " gnat" ,
172
+ "foldComments" : false
173
+ }
174
+ }
175
+ }
176
+ },
177
+ "wait" : []
178
+ }
179
+ },
180
+ {
181
+ "send" : {
182
+ "request" : {
183
+ "jsonrpc" : " 2.0" ,
184
+ "method" : " textDocument/didOpen" ,
185
+ "params" : {
186
+ "textDocument" : {
187
+ "uri" : " $URI{main.adb}" ,
188
+ "languageId" : " Ada" ,
189
+ "version" : 0 ,
190
+ "text" : " procedure Main is\n A : Int\n begin\n null;\n end Main;\n "
191
+ }
192
+ }
193
+ },
194
+ "wait" : []
195
+ }
196
+ },
197
+ {
198
+ "send" : {
199
+ "request" : {
200
+ "jsonrpc" : " 2.0" ,
201
+ "method" : " textDocument/didChange" ,
202
+ "params" : {
203
+ "textDocument" : {
204
+ "uri" : " $URI{main.adb}" ,
205
+ "version" : 1
206
+ },
207
+ "contentChanges" : [
208
+ {
209
+ "range" : {
210
+ "start" : {
211
+ "line" : 1 ,
212
+ "character" : 10
213
+ },
214
+ "end" : {
215
+ "line" : 1 ,
216
+ "character" : 10
217
+ }
218
+ },
219
+ "text" : " e"
220
+ }
221
+ ]
222
+ }
223
+ },
224
+ "wait" : []
225
+ }
226
+ },
227
+ {
228
+ "send" : {
229
+ "request" : {
230
+ "jsonrpc" : " 2.0" ,
231
+ "id" : 5 ,
232
+ "method" : " textDocument/completion" ,
233
+ "params" : {
234
+ "textDocument" : {
235
+ "uri" : " $URI{main.adb}"
236
+ },
237
+ "position" : {
238
+ "line" : 1 ,
239
+ "character" : 11
240
+ },
241
+ "context" : {
242
+ "triggerKind" : 1
243
+ }
244
+ }
245
+ },
246
+ "wait" : [
247
+ {
248
+ "id" : 5 ,
249
+ "result" : {
250
+ "isIncomplete" : false ,
251
+ "items" : [
252
+ {
253
+ "label" : " interface" ,
254
+ "kind" : 14 ,
255
+ "insertText" : " interface" ,
256
+ "insertTextFormat" : 1 ,
257
+ "additionalTextEdits" : []
258
+ },
259
+ {
260
+ "label" : " Integer" ,
261
+ "kind" : 7 ,
262
+ "detail" : " type Integer is range -(2 ** 31) .. +(2 ** 31 - 1);" ,
263
+ "documentation" : " at __standard (4:3)" ,
264
+ "sortText" : " 000&2Integer" ,
265
+ "additionalTextEdits" : []
266
+ }
267
+ ]
268
+ }
269
+ }
270
+ ]
271
+ }
272
+ },
273
+ {
274
+ "send" : {
275
+ "request" : {
276
+ "jsonrpc" : " 2.0" ,
277
+ "id" : 9 ,
278
+ "method" : " completionItem/resolve" ,
279
+ "params" : {
280
+ "label" : " Integer" ,
281
+ "kind" : 7 ,
282
+ "detail" : " type Integer is range -(2 ** 31) .. +(2 ** 31 - 1);" ,
283
+ "documentation" : " at __standard (4:3)" ,
284
+ "sortText" : " 000&2Integer" ,
285
+ "additionalTextEdits" : []
286
+ }
287
+ },
288
+ "wait" : [
289
+ {
290
+ "id" : 9 ,
291
+ "result" : {
292
+ "label" : " Integer" ,
293
+ "kind" : 7 ,
294
+ "detail" : " type Integer is range -(2 ** 31) .. +(2 ** 31 - 1);" ,
295
+ "documentation" : " at __standard (4:3)" ,
296
+ "sortText" : " 000&2Integer" ,
297
+ "additionalTextEdits" : []
298
+ }
299
+ }
300
+ ]
301
+ }
302
+ },
303
+ {
304
+ "send" : {
305
+ "request" : {
306
+ "jsonrpc" : " 2.0" ,
307
+ "id" : 10 ,
308
+ "method" : " shutdown"
309
+ },
310
+ "wait" : [
311
+ {
312
+ "id" : 10 ,
313
+ "result" : null
314
+ }
315
+ ]
316
+ }
317
+ },
318
+ {
319
+ "stop" : {
320
+ "exit_code" : 0
321
+ }
322
+ }
323
+ ]
0 commit comments