@@ -61,7 +61,7 @@ public partial record CompletionParams : TextDocumentPositionParams, IWorkDonePr
6161 GenerateTypedData
6262 ]
6363 [ RegistrationOptions ( typeof ( CompletionRegistrationOptions ) ) , Capability ( typeof ( CompletionCapability ) ) ]
64- public partial record CompletionItem : ICanBeResolved , IRequest < CompletionItem >
64+ public partial record CompletionItem : ICanBeResolved , IRequest < CompletionItem > , IDoesNotParticipateInRegistration
6565 {
6666 /// <summary>
6767 /// The label of this completion item. By default
@@ -217,8 +217,57 @@ public partial record CompletionItem : ICanBeResolved, IRequest<CompletionItem>
217217 public override string ToString ( ) => DebuggerDisplay ;
218218 }
219219
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+
220268 [ GenerateRegistrationOptions ( nameof ( ServerCapabilities . CompletionProvider ) ) ]
221269 [ RegistrationOptionsConverter ( typeof ( CompletionRegistrationOptionsConverter ) ) ]
270+ [ RegistrationName ( TextDocumentNames . Completion ) ]
222271 public partial class CompletionRegistrationOptions : IWorkDoneProgressOptions , ITextDocumentRegistrationOptions
223272 {
224273 /// <summary>
@@ -293,6 +342,25 @@ public record CompletionContext
293342 public string ? TriggerCharacter { get ; init ; }
294343 }
295344
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+
296364 /// <summary>
297365 /// Represents a collection of [completion items](#CompletionItem) to be presented
298366 /// in the editor.
@@ -514,73 +582,6 @@ public class CompletionItemKindCapabilityOptions
514582 public Container < CompletionItemKind > ? ValueSet { get ; set ; }
515583 }
516584
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-
584585 public class CompletionItemTagSupportCapabilityOptions
585586 {
586587 /// <summary>
0 commit comments