@@ -113,22 +113,22 @@ public partial record CompletionItem : ICanBeResolved, IRequest<CompletionItem>,
113
113
114
114
/// <summary>
115
115
/// A string that shoud be used when comparing this item
116
- /// with other items. When `falsy` the label is used.
116
+ /// with other items. When omitted the label is used.
117
117
/// </summary>
118
118
[ Optional ]
119
119
public string ? SortText { get ; init ; }
120
120
121
121
/// <summary>
122
122
/// A string that should be used when filtering a set of
123
- /// completion items. When `falsy` the label is used.
123
+ /// completion items. When omitted the label is used.
124
124
/// </summary>
125
125
126
126
[ Optional ]
127
127
public string ? FilterText { get ; init ; }
128
128
129
129
/// <summary>
130
130
/// A string that should be inserted a document when selecting
131
- /// this completion. When `falsy` the label is used.
131
+ /// this completion. When omitted the label is used.
132
132
/// </summary>
133
133
134
134
[ Optional ]
@@ -223,7 +223,7 @@ public partial record CompletionItem : ICanBeResolved, IRequest<CompletionItem>,
223
223
[ Optional ]
224
224
public JToken ? Data { get ; init ; }
225
225
226
- private string DebuggerDisplay => $ "[{ Kind } ] { Label } { ( Tags ? . Any ( ) == true ? $ " tags: { string . Join ( ", " , Tags . Select ( z => z . ToString ( ) ) ) } " : "" ) } ";
226
+ private string DebuggerDisplay => $ "[{ Kind } ] { Label } { ( Tags ? . Any ( ) == true ? $ " tags: { string . Join ( ", " , Tags . Select ( z => z . ToString ( ) ) ) } " : "" ) } ";
227
227
228
228
/// <inheritdoc />
229
229
public override string ToString ( ) => DebuggerDisplay ;
@@ -351,7 +351,7 @@ public class CompletionRegistrationCompletionItemOptions
351
351
/// details (see also `CompletionItemLabelDetails`) when receiving
352
352
/// a completion item in a resolve call.
353
353
///
354
- /// @since 3.17.0 - proposed state
354
+ /// @since 3.17.0
355
355
/// </summary>
356
356
[ Optional ]
357
357
public bool ? LabelDetailsSupport { get ; set ; }
@@ -438,7 +438,7 @@ public CompletionList(IEnumerable<CompletionItem> items, bool isIncomplete) : ba
438
438
/// signals support for this via the `completionList.itemDefaults`
439
439
/// capability.
440
440
///
441
- /// @since 3.17.0 - proposed state
441
+ /// @since 3.17.0
442
442
/// </summary>
443
443
[ Optional ]
444
444
public CompletionListItemDefaults ? ItemDefaults { get ; set ; }
@@ -450,11 +450,11 @@ public CompletionList(IEnumerable<CompletionItem> items, bool isIncomplete) : ba
450
450
{
451
451
ItemDefaults = list . ItemDefaults
452
452
} ,
453
- _ => null
453
+ _ => null
454
454
} ;
455
455
456
456
public static CompletionList From ( CompletionList ? source , IEnumerable < CompletionItem > ? result )
457
- => new ( ( source ? . Items ?? Array . Empty < CompletionItem > ( ) ) . Concat ( result ?? Array . Empty < CompletionItem > ( ) ) )
457
+ => new ( ( source ? . Items ?? Array . Empty < CompletionItem > ( ) ) . Concat ( result ?? Array . Empty < CompletionItem > ( ) ) )
458
458
{
459
459
ItemDefaults = source ? . ItemDefaults
460
460
} ;
@@ -559,7 +559,7 @@ public CompletionList(bool isIncomplete, params CompletionItem<T>[] items) : bas
559
559
/// signals support for this via the `completionList.itemDefaults`
560
560
/// capability.
561
561
///
562
- /// @since 3.17.0 - proposed state
562
+ /// @since 3.17.0
563
563
/// </summary>
564
564
[ Optional ]
565
565
public CompletionListItemDefaults ? ItemDefaults { get ; set ; }
@@ -574,71 +574,71 @@ public CompletionList(bool isIncomplete, params CompletionItem<T>[] items) : bas
574
574
} ,
575
575
_ => null
576
576
} ;
577
-
577
+
578
578
[ return : System . Diagnostics . CodeAnalysis . NotNullIfNotNull ( "container" ) ]
579
- public static implicit operator CompletionList ? ( CompletionList < T > ? container ) => container switch
579
+ public static implicit operator CompletionList ? ( CompletionList < T > ? container ) => container switch
580
580
{
581
581
not null => new CompletionList ( container . Select ( value => ( CompletionItem ) value ) , container . IsIncomplete )
582
582
{
583
583
ItemDefaults = container . ItemDefaults
584
584
} ,
585
- _ => null
585
+ _ => null
586
586
} ;
587
-
587
+
588
588
}
589
-
590
- internal class TypedCompletionListConverter : JsonConverter
591
- {
592
- public override void WriteJson ( JsonWriter writer , object ? value , JsonSerializer serializer )
593
- {
594
- serializer . Serialize ( writer , ( CompletionList ? ) value ) ;
595
- }
596
589
597
- public override object ? ReadJson ( JsonReader reader , Type objectType , object ? existingValue , JsonSerializer serializer )
598
- {
599
- var completionList = serializer . Deserialize < CompletionList > ( reader ) ;
600
- return objectType . GetMethod ( nameof ( CompletionList < IHandlerIdentity > . Create ) , BindingFlags . Static | BindingFlags . Public ) !
601
- . Invoke ( null , new object [ ] { completionList } ) ! ;
602
- }
590
+ internal class TypedCompletionListConverter : JsonConverter
591
+ {
592
+ public override void WriteJson ( JsonWriter writer , object ? value , JsonSerializer serializer )
593
+ {
594
+ serializer . Serialize ( writer , ( CompletionList ? ) value ) ;
595
+ }
603
596
604
- public override bool CanConvert ( Type objectType )
605
- {
606
- return objectType . IsGenericType && objectType . GetGenericTypeDefinition ( ) == typeof ( CompletionList < > ) ;
607
- }
597
+ public override object ? ReadJson ( JsonReader reader , Type objectType , object ? existingValue , JsonSerializer serializer )
598
+ {
599
+ var completionList = serializer . Deserialize < CompletionList > ( reader ) ;
600
+ return objectType . GetMethod ( nameof ( CompletionList < IHandlerIdentity > . Create ) , BindingFlags . Static | BindingFlags . Public ) !
601
+ . Invoke ( null , new object [ ] { completionList } ) ! ;
602
+ }
608
603
609
- public override bool CanRead => true ;
604
+ public override bool CanConvert ( Type objectType )
605
+ {
606
+ return objectType . IsGenericType && objectType . GetGenericTypeDefinition ( ) == typeof ( CompletionList < > ) ;
610
607
}
611
608
609
+ public override bool CanRead => true ;
610
+ }
611
+
612
612
public record CompletionListItemDefaults
613
613
{
614
614
/// <summary>
615
615
/// A default commit character set.
616
616
///
617
- /// @since 3.17.0 - proposed state
617
+ /// @since 3.17.0
618
618
/// </summary>
619
619
[ Optional ]
620
620
public Container < string > ? CommitCharacters { get ; init ; }
621
621
622
622
/// <summary>
623
623
/// A default edit range
624
624
///
625
- /// @since 3.17.0 - proposed state
625
+ /// @since 3.17.0
626
626
/// </summary>
627
627
[ Optional ]
628
628
public RangeOrEditRange ? EditRange { get ; init ; }
629
629
630
630
/// <summary>
631
631
/// A default insert text format
632
632
///
633
- /// @since 3.17.0 - proposed state
633
+ /// @since 3.17.0
634
634
/// </summary>
635
635
[ Optional ]
636
636
public InsertTextFormat ? InsertTextFormat { get ; init ; }
637
637
638
638
/// <summary>
639
639
/// A default insert text mode
640
640
///
641
- /// @since 3.17.0 - proposed state
641
+ /// @since 3.17.0
642
642
/// </summary>
643
643
public InsertTextMode ? InsertTextMode { get ; init ; }
644
644
@@ -704,7 +704,7 @@ public partial class CompletionCapability : DynamicCapability
704
704
/// The client's default when the completion item doesn't provide a
705
705
/// `insertTextMode` property.
706
706
///
707
- /// @since 3.17.0 - proposed state
707
+ /// @since 3.17.0
708
708
/// </summary>
709
709
[ Optional ]
710
710
public InsertTextMode ? InsertTextMode { get ; set ; }
@@ -713,7 +713,7 @@ public partial class CompletionCapability : DynamicCapability
713
713
/// The client supports the following `CompletionList` specific
714
714
/// capabilities.
715
715
///
716
- /// @since 3.17.0 - proposed state
716
+ /// @since 3.17.0
717
717
/// </summary>
718
718
[ Optional ]
719
719
public CompletionListCapabilityOptions ? CompletionList { get ; set ; }
@@ -723,19 +723,19 @@ public partial class CompletionCapability : DynamicCapability
723
723
/// The client supports the following `CompletionList` specific
724
724
/// capabilities.
725
725
///
726
- /// @since 3.17.0 - proposed state
726
+ /// @since 3.17.0
727
727
/// </summary>
728
728
public class CompletionListCapabilityOptions
729
729
{
730
730
/// <summary>
731
- /// The client supports the the following itemDefaults on
731
+ /// The client supports the following itemDefaults on
732
732
/// a completion list.
733
733
///
734
734
/// The value lists the supported property names of the
735
735
/// `CompletionList.itemDefaults` object. If omitted
736
736
/// no properties are supported.
737
737
///
738
- /// @since 3.17.0 - proposed state
738
+ /// @since 3.17.0
739
739
/// </summary>
740
740
[ Optional ]
741
741
public Container < string > ? ItemDefaults { get ; set ; }
@@ -832,7 +832,7 @@ public class CompletionItemCapabilityOptions
832
832
/// The client has support for completion item label
833
833
/// details (see also `CompletionItemLabelDetails`).
834
834
///
835
- /// @since 3.17.0 - proposed state
835
+ /// @since 3.17.0
836
836
/// </summary>
837
837
[ Optional ]
838
838
public bool LabelDetailsSupport { get ; set ; }
0 commit comments