6
6
-- DON'T EDIT THIS FILE! It was generated from metaModel.json.
7
7
--
8
8
9
+ with VSS.Strings ;
10
+
9
11
package LSP.Enumerations is
10
12
pragma Preelaborate;
11
13
@@ -21,21 +23,19 @@ package LSP.Enumerations is
21
23
22
24
type AlsVisibility is (Als_Public, Als_Protected, Als_Private);
23
25
24
- type CodeActionKind is
25
- (Empty, QuickFix, Refactor, RefactorExtract, RefactorInline,
26
- RefactorRewrite, Source, SourceOrganizeImports, SourceFixAll);
26
+ type CodeActionKind is new VSS.Strings.Virtual_String with null record ;
27
27
-- A set of predefined code action kinds
28
- --
29
- -- @value Empty
28
+
29
+ function Empty return CodeActionKind is ( " " );
30
30
-- Empty kind.
31
- --
32
- -- @value QuickFix
31
+
32
+ function QuickFix return CodeActionKind is ( " quickfix " );
33
33
-- Base kind for quickfix actions: 'quickfix'
34
- --
35
- -- @value Refactor
34
+
35
+ function Refactor return CodeActionKind is ( " refactor " );
36
36
-- Base kind for refactoring actions: 'refactor'
37
- --
38
- -- @value RefactorExtract
37
+
38
+ function RefactorExtract return CodeActionKind is ( " refactor.extract " );
39
39
-- Base kind for refactoring extraction actions: 'refactor.extract'
40
40
--
41
41
-- Example extract actions:
@@ -44,8 +44,8 @@ package LSP.Enumerations is
44
44
-- - Extract function
45
45
-- - Extract variable
46
46
-- - Extract interface from class - ...
47
- --
48
- -- @value RefactorInline
47
+
48
+ function RefactorInline return CodeActionKind is ( " refactor.inline " );
49
49
-- Base kind for refactoring inline actions: 'refactor.inline'
50
50
--
51
51
-- Example inline actions:
@@ -54,25 +54,26 @@ package LSP.Enumerations is
54
54
-- - Inline variable
55
55
-- - Inline constant
56
56
-- - ...
57
- --
58
- -- @value RefactorRewrite
57
+
58
+ function RefactorRewrite return CodeActionKind is ( " refactor.rewrite " );
59
59
-- Base kind for refactoring rewrite actions: 'refactor.rewrite'
60
60
--
61
61
-- Example rewrite actions:
62
62
--
63
63
-- - Convert JavaScript function to class - Add or remove parameter -
64
64
-- Encapsulate field - Make method static - Move method to base class - ...
65
- --
66
- -- @value Source
65
+
66
+ function Source return CodeActionKind is ( " source " );
67
67
-- Base kind for source actions: `source`
68
68
--
69
69
-- Source code actions apply to the entire file.
70
- --
71
- -- @value SourceOrganizeImports
70
+
71
+ function SourceOrganizeImports return CodeActionKind is
72
+ (" source.organizeImports" );
72
73
-- Base kind for an organize imports source action:
73
74
-- `source.organizeImports`
74
- --
75
- -- @value SourceFixAll
75
+
76
+ function SourceFixAll return CodeActionKind is ( " source.fixAll " );
76
77
-- Base kind for auto-fix source actions: `source.fixAll`.
77
78
--
78
79
-- Fix all actions automatically fix errors that have a clear fix that
@@ -170,34 +171,43 @@ package LSP.Enumerations is
170
171
-- @value Write
171
172
-- Write-access of a symbol, like writing to a variable.
172
173
173
- type ErrorCodes is
174
- (ParseError, InvalidRequest, MethodNotFound, InvalidParams, InternalError,
175
- jsonrpcReservedErrorRangeStart, serverErrorStart, ServerNotInitialized,
176
- UnknownErrorCode, jsonrpcReservedErrorRangeEnd, serverErrorEnd);
174
+ type ErrorCodes is new Integer;
177
175
-- Predefined error codes.
178
- --
179
- -- @value jsonrpcReservedErrorRangeStart
176
+
177
+ function ParseError return ErrorCodes is (-32_700 );
178
+
179
+ function InvalidRequest return ErrorCodes is (-32_600 );
180
+
181
+ function MethodNotFound return ErrorCodes is (-32_601 );
182
+
183
+ function InvalidParams return ErrorCodes is (-32_602 );
184
+
185
+ function InternalError return ErrorCodes is (-32_603 );
186
+
187
+ function jsonrpcReservedErrorRangeStart return ErrorCodes is (-32_099 );
180
188
-- This is the start range of JSON RPC reserved error codes. It doesn't
181
189
-- denote a real error code. No application error codes should be defined
182
190
-- between the start and end range. For backwards compatibility the
183
191
-- `ServerNotInitialized` and the `UnknownErrorCode` are left in the range.
184
192
--
185
193
-- @since 3.16.0
186
- --
187
- -- @value serverErrorStart
194
+
195
+ function serverErrorStart return ErrorCodes is (- 32_099 );
188
196
-- @deprecated use jsonrpcReservedErrorRangeStart */
189
- --
190
- -- @value ServerNotInitialized
197
+
198
+ function ServerNotInitialized return ErrorCodes is (- 32_002 );
191
199
-- Error code indicating that a server received a notification or request
192
200
-- before the server has received the `initialize` request.
193
- --
194
- -- @value jsonrpcReservedErrorRangeEnd
201
+
202
+ function UnknownErrorCode return ErrorCodes is (-32_001 );
203
+
204
+ function jsonrpcReservedErrorRangeEnd return ErrorCodes is (-32_000 );
195
205
-- This is the end range of JSON RPC reserved error codes. It doesn't
196
206
-- denote a real error code.
197
207
--
198
208
-- @since 3.16.0
199
- --
200
- -- @value serverErrorEnd
209
+
210
+ function serverErrorEnd return ErrorCodes is (- 32_000 );
201
211
-- @deprecated use jsonrpcReservedErrorRangeEnd */
202
212
203
213
type FailureHandlingKind is
@@ -245,16 +255,16 @@ package LSP.Enumerations is
245
255
-- @value folder
246
256
-- The pattern matches a folder only.
247
257
248
- type FoldingRangeKind is (Comment, Imports, Region) ;
258
+ type FoldingRangeKind is new VSS.Strings.Virtual_String with null record ;
249
259
-- A set of predefined range kinds.
250
- --
251
- -- @value Comment
260
+
261
+ function Comment return FoldingRangeKind is ( " comment " );
252
262
-- Folding range for a comment
253
- --
254
- -- @value Imports
263
+
264
+ function Imports return FoldingRangeKind is ( " imports " );
255
265
-- Folding range for an import or include
256
- --
257
- -- @value Region
266
+
267
+ function Region return FoldingRangeKind is ( " region " );
258
268
-- Folding range for a region (e.g. `#region`)
259
269
260
270
type InlayHintKind is (A_Type, Parameter);
@@ -307,42 +317,40 @@ package LSP.Enumerations is
307
317
-- line completion item is indented using 2 tabs and all following lines
308
318
-- inserted will be indented using 2 tabs as well.
309
319
310
- type LSPErrorCodes is
311
- (lspReservedErrorRangeStart, RequestFailed, ServerCancelled,
312
- ContentModified, RequestCancelled, lspReservedErrorRangeEnd);
313
- --
314
- -- @value lspReservedErrorRangeStart
320
+ type LSPErrorCodes is new Integer;
321
+
322
+ function lspReservedErrorRangeStart return LSPErrorCodes is (-32_899 );
315
323
-- This is the start range of LSP reserved error codes. It doesn't denote a
316
324
-- real error code.
317
325
--
318
326
-- @since 3.16.0
319
- --
320
- -- @value RequestFailed
327
+
328
+ function RequestFailed return LSPErrorCodes is (- 32_803 );
321
329
-- A request failed but it was syntactically correct, e.g the method
322
330
-- name was known and the parameters were valid. The error message
323
331
-- should contain human readable information about why the request failed.
324
332
--
325
333
-- @since 3.17.0
326
- --
327
- -- @value ServerCancelled
334
+
335
+ function ServerCancelled return LSPErrorCodes is (- 32_802 );
328
336
-- The server cancelled the request. This error code should only be used
329
337
-- for requests that explicitly support being server cancellable.
330
338
--
331
339
-- @since 3.17.0
332
- --
333
- -- @value ContentModified
340
+
341
+ function ContentModified return LSPErrorCodes is (- 32_801 );
334
342
-- The server detected that the content of a document got modified outside
335
343
-- normal conditions. A server should NOT send this error code if it
336
344
-- detects a content change in it unprocessed messages. The result
337
345
-- even computed on an older state might still be useful for the client.
338
346
--
339
347
-- If a client decides that a result is not of any use anymore the client
340
348
-- should cancel the request.
341
- --
342
- -- @value RequestCancelled
349
+
350
+ function RequestCancelled return LSPErrorCodes is (- 32_800 );
343
351
-- The client has canceled a request and a server as detected the cancel.
344
- --
345
- -- @value lspReservedErrorRangeEnd
352
+
353
+ function lspReservedErrorRangeEnd return LSPErrorCodes is (- 32_800 );
346
354
-- This is the end range of LSP reserved error codes. It doesn't denote a
347
355
-- real error code.
348
356
--
@@ -402,20 +410,21 @@ package LSP.Enumerations is
402
410
-- @value Code
403
411
-- A code-cell is source code.
404
412
405
- type PositionEncodingKind is (UTF8, UTF16, UTF32);
413
+ type PositionEncodingKind is
414
+ new VSS.Strings.Virtual_String with null record ;
406
415
-- A set of predefined position encoding kinds.
407
416
--
408
417
-- @since 3.17.0
409
- --
410
- -- @value UTF8
418
+
419
+ function UTF8 return PositionEncodingKind is ( " utf-8 " );
411
420
-- Character offsets count UTF-8 code units.
412
- --
413
- -- @value UTF16
421
+
422
+ function UTF16 return PositionEncodingKind is ( " utf-16 " );
414
423
-- Character offsets count UTF-16 code units.
415
424
--
416
425
-- This is the default and must always be supported by servers
417
- --
418
- -- @value UTF32
426
+
427
+ function UTF32 return PositionEncodingKind is ( " utf-32 " );
419
428
-- Character offsets count UTF-32 code units.
420
429
--
421
430
-- Implementation note: these are the same as Unicode code points, so
@@ -556,15 +565,15 @@ package LSP.Enumerations is
556
565
-- @value global
557
566
-- The moniker is globally unique
558
567
559
- type WatchKind is (Create, Change, Delete) ;
560
- --
561
- -- @value Create
568
+ type WatchKind is mod 2 ** 16 ;
569
+
570
+ function Create return WatchKind is ( 1 );
562
571
-- Interested in create events.
563
- --
564
- -- @value Change
572
+
573
+ function Change return WatchKind is ( 2 );
565
574
-- Interested in change events
566
- --
567
- -- @value Delete
575
+
576
+ function Delete return WatchKind is ( 4 );
568
577
-- Interested in delete events
569
578
570
579
end LSP.Enumerations ;
0 commit comments