@@ -408,6 +408,14 @@ class CodeActionKind(StrEnum):
408
408
@since 3.18.0 """
409
409
410
410
411
+ class CodeActionTag (IntEnum ):
412
+ """ Code action tags are extra annotations that tweak the behavior of a code action.
413
+
414
+ @since 3.18.0 - proposed """
415
+ LLMGenerated = 1
416
+ """ Marks the code action as LLM-generated. """
417
+
418
+
411
419
class TraceValue (StrEnum ):
412
420
Off = 'off'
413
421
""" Turn tracing off. """
@@ -431,8 +439,7 @@ class MarkupKind(StrEnum):
431
439
432
440
class LanguageKind (StrEnum ):
433
441
""" Predefined Language kinds
434
- @since 3.18.0
435
- @proposed """
442
+ @since 3.18.0 """
436
443
ABAP = 'abap'
437
444
WindowsBat = 'bat'
438
445
BibTeX = 'bibtex'
@@ -590,6 +597,21 @@ class CompletionTriggerKind(IntEnum):
590
597
""" Completion was re-triggered as current completion list is incomplete """
591
598
592
599
600
+ class ApplyKind (IntFlag ):
601
+ """ Defines how values from a set of defaults and an individual item will be
602
+ merged.
603
+
604
+ @since 3.18.0 """
605
+ Replace = 1
606
+ """ The value from the individual item (if provided and not `null`) will be
607
+ used instead of the default. """
608
+ Merge = 2
609
+ """ The value from the item will be merged with the default.
610
+
611
+ The specific rules for mergeing values are defined against each field
612
+ that supports merging. """
613
+
614
+
593
615
class SignatureHelpTriggerKind (IntEnum ):
594
616
""" How a signature help was triggered.
595
617
@@ -768,7 +790,7 @@ class TokenFormat(StrEnum):
768
790
""" A document filter describes a top level text document or
769
791
a notebook cell document.
770
792
771
- @since 3.17.0 - proposed support for NotebookCellTextDocumentFilter. """
793
+ @since 3.17.0 - support for NotebookCellTextDocumentFilter. """
772
794
773
795
LSPObject = Dict [str , 'LSPAny' ]
774
796
""" LSP object definition.
@@ -2197,13 +2219,33 @@ class CompletionList(TypedDict):
2197
2219
be used if a completion item itself doesn't specify the value.
2198
2220
2199
2221
If a completion list specifies a default value and a completion item
2200
- also specifies a corresponding value the one from the item is used.
2222
+ also specifies a corresponding value, the rules for combining these are
2223
+ defined by `applyKinds` (if the client supports it), defaulting to
2224
+ ApplyKind.Replace.
2201
2225
2202
2226
Servers are only allowed to return default values if the client
2203
2227
signals support for this via the `completionList.itemDefaults`
2204
2228
capability.
2205
2229
2206
2230
@since 3.17.0 """
2231
+ applyKind : NotRequired ['CompletionItemApplyKinds' ]
2232
+ """ Specifies how fields from a completion item should be combined with those
2233
+ from `completionList.itemDefaults`.
2234
+
2235
+ If unspecified, all fields will be treated as ApplyKind.Replace.
2236
+
2237
+ If a field's value is ApplyKind.Replace, the value from a completion item
2238
+ (if provided and not `null`) will always be used instead of the value
2239
+ from `completionItem.itemDefaults`.
2240
+
2241
+ If a field's value is ApplyKind.Merge, the values will be merged using
2242
+ the rules defined against each field below.
2243
+
2244
+ Servers are only allowed to return `applyKind` if the client
2245
+ signals support for this via the `completionList.applyKindSupport`
2246
+ capability.
2247
+
2248
+ @since 3.18.0 """
2207
2249
items : List ['CompletionItem' ]
2208
2250
""" The completion items. """
2209
2251
@@ -2572,6 +2614,10 @@ class CodeAction(TypedDict):
2572
2614
a `textDocument/codeAction` and a `codeAction/resolve` request.
2573
2615
2574
2616
@since 3.16.0 """
2617
+ tags : NotRequired [List ['CodeActionTag' ]]
2618
+ """ Tags for this code action.
2619
+
2620
+ @since 3.18.0 - proposed """
2575
2621
2576
2622
2577
2623
class CodeActionRegistrationOptions (TypedDict ):
@@ -3913,7 +3959,9 @@ class CompletionItemDefaults(TypedDict):
3913
3959
be used if a completion item itself doesn't specify the value.
3914
3960
3915
3961
If a completion list specifies a default value and a completion item
3916
- also specifies a corresponding value the one from the item is used.
3962
+ also specifies a corresponding value, the rules for combining these are
3963
+ defined by `applyKinds` (if the client supports it), defaulting to
3964
+ ApplyKind.Replace.
3917
3965
3918
3966
Servers are only allowed to return default values if the client
3919
3967
signals support for this via the `completionList.itemDefaults`
@@ -3942,6 +3990,65 @@ class CompletionItemDefaults(TypedDict):
3942
3990
@since 3.17.0 """
3943
3991
3944
3992
3993
+ class CompletionItemApplyKinds (TypedDict ):
3994
+ """ Specifies how fields from a completion item should be combined with those
3995
+ from `completionList.itemDefaults`.
3996
+
3997
+ If unspecified, all fields will be treated as ApplyKind.Replace.
3998
+
3999
+ If a field's value is ApplyKind.Replace, the value from a completion item (if
4000
+ provided and not `null`) will always be used instead of the value from
4001
+ `completionItem.itemDefaults`.
4002
+
4003
+ If a field's value is ApplyKind.Merge, the values will be merged using the rules
4004
+ defined against each field below.
4005
+
4006
+ Servers are only allowed to return `applyKind` if the client
4007
+ signals support for this via the `completionList.applyKindSupport`
4008
+ capability.
4009
+
4010
+ @since 3.18.0 """
4011
+ commitCharacters : NotRequired ['ApplyKind' ]
4012
+ """ Specifies whether commitCharacters on a completion will replace or be
4013
+ merged with those in `completionList.itemDefaults.commitCharacters`.
4014
+
4015
+ If ApplyKind.Replace, the commit characters from the completion item will
4016
+ always be used unless not provided, in which case those from
4017
+ `completionList.itemDefaults.commitCharacters` will be used. An
4018
+ empty list can be used if a completion item does not have any commit
4019
+ characters and also should not use those from
4020
+ `completionList.itemDefaults.commitCharacters`.
4021
+
4022
+ If ApplyKind.Merge the commitCharacters for the completion will be the
4023
+ union of all values in both `completionList.itemDefaults.commitCharacters`
4024
+ and the completion's own `commitCharacters`.
4025
+
4026
+ @since 3.18.0 """
4027
+ data : NotRequired ['ApplyKind' ]
4028
+ """ Specifies whether the `data` field on a completion will replace or
4029
+ be merged with data from `completionList.itemDefaults.data`.
4030
+
4031
+ If ApplyKind.Replace, the data from the completion item will be used if
4032
+ provided (and not `null`), otherwise
4033
+ `completionList.itemDefaults.data` will be used. An empty object can
4034
+ be used if a completion item does not have any data but also should
4035
+ not use the value from `completionList.itemDefaults.data`.
4036
+
4037
+ If ApplyKind.Merge, a shallow merge will be performed between
4038
+ `completionList.itemDefaults.data` and the completion's own data
4039
+ using the following rules:
4040
+
4041
+ - If a completion's `data` field is not provided (or `null`), the
4042
+ entire `data` field from `completionList.itemDefaults.data` will be
4043
+ used as-is.
4044
+ - If a completion's `data` field is provided, each field will
4045
+ overwrite the field of the same name in
4046
+ `completionList.itemDefaults.data` but no merging of nested fields
4047
+ within that value will occur.
4048
+
4049
+ @since 3.18.0 """
4050
+
4051
+
3945
4052
class CompletionOptions (TypedDict ):
3946
4053
""" Completion options. """
3947
4054
triggerCharacters : NotRequired [List [str ]]
@@ -4771,6 +4878,10 @@ class TextDocumentClientCapabilities(TypedDict):
4771
4878
""" Text document specific client capabilities. """
4772
4879
synchronization : NotRequired ['TextDocumentSyncClientCapabilities' ]
4773
4880
""" Defines which synchronization capabilities the client supports. """
4881
+ filters : NotRequired ['TextDocumentFilterClientCapabilities' ]
4882
+ """ Defines which filters the client supports.
4883
+
4884
+ @since 3.18.0 """
4774
4885
completion : NotRequired ['CompletionClientCapabilities' ]
4775
4886
""" Capabilities specific to the `textDocument/completion` request. """
4776
4887
hover : NotRequired ['HoverClientCapabilities' ]
@@ -4991,7 +5102,9 @@ class TextDocumentFilterLanguage(TypedDict):
4991
5102
pattern : NotRequired ['GlobPattern' ]
4992
5103
""" A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
4993
5104
4994
- @since 3.18.0 - support for relative patterns. """
5105
+ @since 3.18.0 - support for relative patterns. Whether clients support
5106
+ relative patterns depends on the client capability
5107
+ `textDocuments.filters.relativePatternSupport`. """
4995
5108
4996
5109
4997
5110
class TextDocumentFilterScheme (TypedDict ):
@@ -5005,7 +5118,9 @@ class TextDocumentFilterScheme(TypedDict):
5005
5118
pattern : NotRequired ['GlobPattern' ]
5006
5119
""" A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
5007
5120
5008
- @since 3.18.0 - support for relative patterns. """
5121
+ @since 3.18.0 - support for relative patterns. Whether clients support
5122
+ relative patterns depends on the client capability
5123
+ `textDocuments.filters.relativePatternSupport`. """
5009
5124
5010
5125
5011
5126
class TextDocumentFilterPattern (TypedDict ):
@@ -5019,7 +5134,9 @@ class TextDocumentFilterPattern(TypedDict):
5019
5134
pattern : 'GlobPattern'
5020
5135
""" A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
5021
5136
5022
- @since 3.18.0 - support for relative patterns. """
5137
+ @since 3.18.0 - support for relative patterns. Whether clients support
5138
+ relative patterns depends on the client capability
5139
+ `textDocuments.filters.relativePatternSupport`. """
5023
5140
5024
5141
5025
5142
class NotebookDocumentFilterNotebookType (TypedDict ):
@@ -5280,6 +5397,13 @@ class TextDocumentSyncClientCapabilities(TypedDict):
5280
5397
""" The client supports did save notifications. """
5281
5398
5282
5399
5400
+ class TextDocumentFilterClientCapabilities (TypedDict ):
5401
+ relativePatternSupport : NotRequired [bool ]
5402
+ """ The client supports Relative Patterns.
5403
+
5404
+ @since 3.18.0 """
5405
+
5406
+
5283
5407
class CompletionClientCapabilities (TypedDict ):
5284
5408
""" Completion client capabilities """
5285
5409
dynamicRegistration : NotRequired [bool ]
@@ -5449,6 +5573,11 @@ class CodeActionClientCapabilities(TypedDict):
5449
5573
5450
5574
@since 3.18.0
5451
5575
@proposed """
5576
+ tagSupport : NotRequired ['CodeActionTagOptions' ]
5577
+ """ Client supports the tag property on a code action. Clients
5578
+ supporting tags have to handle unknown tags gracefully.
5579
+
5580
+ @since 3.18.0 - proposed """
5452
5581
5453
5582
5454
5583
class CodeLensClientCapabilities (TypedDict ):
@@ -5895,6 +6024,18 @@ class CompletionListCapabilities(TypedDict):
5895
6024
no properties are supported.
5896
6025
5897
6026
@since 3.17.0 """
6027
+ applyKindSupport : NotRequired [bool ]
6028
+ """ Specifies whether the client supports `CompletionList.applyKind` to
6029
+ indicate how supported values from `completionList.itemDefaults`
6030
+ and `completion` will be combined.
6031
+
6032
+ If a client supports `applyKind` it must support it for all fields
6033
+ that it supports that are listed in `CompletionList.applyKind`. This
6034
+ means when clients add support for new/future fields in completion
6035
+ items the MUST also support merge for them if those fields are
6036
+ defined in `CompletionList.applyKind`.
6037
+
6038
+ @since 3.18.0 """
5898
6039
5899
6040
5900
6041
class ClientSignatureInformationOptions (TypedDict ):
@@ -5931,6 +6072,12 @@ class ClientCodeActionResolveOptions(TypedDict):
5931
6072
""" The properties that a client can resolve lazily. """
5932
6073
5933
6074
6075
+ class CodeActionTagOptions (TypedDict ):
6076
+ """ @since 3.18.0 - proposed """
6077
+ valueSet : List ['CodeActionTag' ]
6078
+ """ The tags supported by the client. """
6079
+
6080
+
5934
6081
class ClientCodeLensResolveOptions (TypedDict ):
5935
6082
""" @since 3.18.0 """
5936
6083
properties : List [str ]
0 commit comments