@@ -61,7 +61,7 @@ public partial record CompletionParams : TextDocumentPositionParams, IWorkDonePr
61
61
GenerateTypedData
62
62
]
63
63
[ RegistrationOptions ( typeof ( CompletionRegistrationOptions ) ) , Capability ( typeof ( CompletionCapability ) ) ]
64
- public partial record CompletionItem : ICanBeResolved , IRequest < CompletionItem >
64
+ public partial record CompletionItem : ICanBeResolved , IRequest < CompletionItem > , IDoesNotParticipateInRegistration
65
65
{
66
66
/// <summary>
67
67
/// The label of this completion item. By default
@@ -217,8 +217,57 @@ public partial record CompletionItem : ICanBeResolved, IRequest<CompletionItem>
217
217
public override string ToString ( ) => DebuggerDisplay ;
218
218
}
219
219
220
+ /// <summary>
221
+ /// Completion item tags are extra annotations that tweak the rendering of a completion
222
+ /// item.
223
+ ///
224
+ /// @since 3.15.0
225
+ /// </summary>
226
+ [ JsonConverter ( typeof ( NumberEnumConverter ) ) ]
227
+ public enum CompletionItemTag
228
+ {
229
+ /// <summary>
230
+ /// Render a completion as obsolete, usually using a strike-out.
231
+ /// </summary>
232
+ Deprecated = 1
233
+ }
234
+
235
+ /// <summary>
236
+ /// The kind of a completion entry.
237
+ /// </summary>
238
+ [ JsonConverter ( typeof ( NumberEnumConverter ) ) ]
239
+ public enum CompletionItemKind
240
+ {
241
+ Text = 1 ,
242
+ Method = 2 ,
243
+ Function = 3 ,
244
+ Constructor = 4 ,
245
+ Field = 5 ,
246
+ Variable = 6 ,
247
+ Class = 7 ,
248
+ Interface = 8 ,
249
+ Module = 9 ,
250
+ Property = 10 ,
251
+ Unit = 11 ,
252
+ Value = 12 ,
253
+ Enum = 13 ,
254
+ Keyword = 14 ,
255
+ Snippet = 15 ,
256
+ Color = 16 ,
257
+ File = 17 ,
258
+ Reference = 18 ,
259
+ Folder = 19 ,
260
+ EnumMember = 20 ,
261
+ Constant = 21 ,
262
+ Struct = 22 ,
263
+ Event = 23 ,
264
+ Operator = 24 ,
265
+ TypeParameter = 25 ,
266
+ }
267
+
220
268
[ GenerateRegistrationOptions ( nameof ( ServerCapabilities . CompletionProvider ) ) ]
221
269
[ RegistrationOptionsConverter ( typeof ( CompletionRegistrationOptionsConverter ) ) ]
270
+ [ RegistrationName ( TextDocumentNames . Completion ) ]
222
271
public partial class CompletionRegistrationOptions : IWorkDoneProgressOptions , ITextDocumentRegistrationOptions
223
272
{
224
273
/// <summary>
@@ -293,6 +342,25 @@ public record CompletionContext
293
342
public string ? TriggerCharacter { get ; init ; }
294
343
}
295
344
345
+ [ JsonConverter ( typeof ( NumberEnumConverter ) ) ]
346
+ public enum CompletionTriggerKind
347
+ {
348
+ /// <summary>
349
+ /// Completion was triggered by typing an identifier (24x7 code complete), manual invocation (e.g Ctrl+Space) or via API.
350
+ /// </summary>
351
+ Invoked = 1 ,
352
+
353
+ /// <summary>
354
+ /// Completion was triggered by a trigger character specified by the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
355
+ /// </summary>
356
+ TriggerCharacter = 2 ,
357
+
358
+ /// <summary>
359
+ /// Completion was re-triggered as the current completion list is incomplete.
360
+ /// </summary>
361
+ TriggerForIncompleteCompletions = 3 ,
362
+ }
363
+
296
364
/// <summary>
297
365
/// Represents a collection of [completion items](#CompletionItem) to be presented
298
366
/// in the editor.
@@ -514,73 +582,6 @@ public class CompletionItemKindCapabilityOptions
514
582
public Container < CompletionItemKind > ? ValueSet { get ; set ; }
515
583
}
516
584
517
- /// <summary>
518
- /// Completion item tags are extra annotations that tweak the rendering of a completion
519
- /// item.
520
- ///
521
- /// @since 3.15.0
522
- /// </summary>
523
- [ JsonConverter ( typeof ( NumberEnumConverter ) ) ]
524
- public enum CompletionItemTag
525
- {
526
- /// <summary>
527
- /// Render a completion as obsolete, usually using a strike-out.
528
- /// </summary>
529
- Deprecated = 1
530
- }
531
-
532
- /// <summary>
533
- /// The kind of a completion entry.
534
- /// </summary>
535
- [ JsonConverter ( typeof ( NumberEnumConverter ) ) ]
536
- public enum CompletionItemKind
537
- {
538
- Text = 1 ,
539
- Method = 2 ,
540
- Function = 3 ,
541
- Constructor = 4 ,
542
- Field = 5 ,
543
- Variable = 6 ,
544
- Class = 7 ,
545
- Interface = 8 ,
546
- Module = 9 ,
547
- Property = 10 ,
548
- Unit = 11 ,
549
- Value = 12 ,
550
- Enum = 13 ,
551
- Keyword = 14 ,
552
- Snippet = 15 ,
553
- Color = 16 ,
554
- File = 17 ,
555
- Reference = 18 ,
556
- Folder = 19 ,
557
- EnumMember = 20 ,
558
- Constant = 21 ,
559
- Struct = 22 ,
560
- Event = 23 ,
561
- Operator = 24 ,
562
- TypeParameter = 25 ,
563
- }
564
-
565
- [ JsonConverter ( typeof ( NumberEnumConverter ) ) ]
566
- public enum CompletionTriggerKind
567
- {
568
- /// <summary>
569
- /// Completion was triggered by typing an identifier (24x7 code complete), manual invocation (e.g Ctrl+Space) or via API.
570
- /// </summary>
571
- Invoked = 1 ,
572
-
573
- /// <summary>
574
- /// Completion was triggered by a trigger character specified by the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
575
- /// </summary>
576
- TriggerCharacter = 2 ,
577
-
578
- /// <summary>
579
- /// Completion was re-triggered as the current completion list is incomplete.
580
- /// </summary>
581
- TriggerForIncompleteCompletions = 3 ,
582
- }
583
-
584
585
public class CompletionItemTagSupportCapabilityOptions
585
586
{
586
587
/// <summary>
0 commit comments