@@ -49,6 +49,8 @@ class SemanticTokenTypes(StrEnum):
49
49
Operator = 'operator'
50
50
Decorator = 'decorator'
51
51
""" @since 3.17.0 """
52
+ Label = 'label'
53
+ """ @since 3.18.0 """
52
54
53
55
54
56
class SemanticTokenModifiers (StrEnum ):
@@ -118,7 +120,7 @@ class LSPErrorCodes(IntEnum):
118
120
If a client decides that a result is not of any use anymore
119
121
the client should cancel the request. """
120
122
RequestCancelled = - 32800
121
- """ The client has canceled a request and a server as detected
123
+ """ The client has canceled a request and a server has detected
122
124
the cancel. """
123
125
124
126
@@ -1780,6 +1782,48 @@ class InlineCompletionRegistrationOptions(TypedDict):
1780
1782
the request again. See also Registration#id. """
1781
1783
1782
1784
1785
+ class TextDocumentContentParams (TypedDict ):
1786
+ """ Parameters for the `workspace/textDocumentContent` request.
1787
+
1788
+ @since 3.18.0
1789
+ @proposed """
1790
+ uri : 'DocumentUri'
1791
+ """ The uri of the text document. """
1792
+
1793
+
1794
+ class TextDocumentContentResult (TypedDict ):
1795
+ """ Result of the `workspace/textDocumentContent` request.
1796
+
1797
+ @since 3.18.0
1798
+ @proposed """
1799
+ text : str
1800
+ """ The text content of the text document. Please note, that the content of
1801
+ any subsequent open notifications for the text document might differ
1802
+ from the returned content due to whitespace and line ending
1803
+ normalizations done on the client """
1804
+
1805
+
1806
+ class TextDocumentContentRegistrationOptions (TypedDict ):
1807
+ """ Text document content provider registration options.
1808
+
1809
+ @since 3.18.0
1810
+ @proposed """
1811
+ schemes : List [str ]
1812
+ """ The schemes for which the server provides content. """
1813
+ id : NotRequired [str ]
1814
+ """ The id used to register the request. The id can be used to deregister
1815
+ the request again. See also Registration#id. """
1816
+
1817
+
1818
+ class TextDocumentContentRefreshParams (TypedDict ):
1819
+ """ Parameters for the `workspace/textDocumentContent/refresh` request.
1820
+
1821
+ @since 3.18.0
1822
+ @proposed """
1823
+ uri : 'DocumentUri'
1824
+ """ The uri of the text document to refresh. """
1825
+
1826
+
1783
1827
class RegistrationParams (TypedDict ):
1784
1828
registrations : List ['Registration' ]
1785
1829
@@ -2567,7 +2611,13 @@ class WorkspaceSymbolParams(TypedDict):
2567
2611
""" The parameters of a {@link WorkspaceSymbolRequest}. """
2568
2612
query : str
2569
2613
""" A query string to filter symbols by. Clients may send an empty
2570
- string here to request all symbols. """
2614
+ string here to request all symbols.
2615
+
2616
+ The `query`-parameter should be interpreted in a *relaxed way* as editors
2617
+ will apply their own highlighting and scoring on the results. A good rule
2618
+ of thumb is to match case-insensitive and to simply check that the
2619
+ characters of *query* appear in their order in a candidate symbol.
2620
+ Servers shouldn't use prefix, substring, or similar strict matching. """
2571
2621
workDoneToken : NotRequired ['ProgressToken' ]
2572
2622
""" An optional token that a server can use to report work done progress. """
2573
2623
partialResultToken : NotRequired ['ProgressToken' ]
@@ -3077,18 +3127,12 @@ class Position(TypedDict):
3077
3127
3078
3128
@since 3.17.0 - support for negotiated position encoding. """
3079
3129
line : Uint
3080
- """ Line position in a document (zero-based).
3081
-
3082
- If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document.
3083
- If a line number is negative, it defaults to 0. """
3130
+ """ Line position in a document (zero-based). """
3084
3131
character : Uint
3085
3132
""" Character offset on a line in a document (zero-based).
3086
3133
3087
3134
The meaning of this offset is determined by the negotiated
3088
- `PositionEncodingKind`.
3089
-
3090
- If the character value is greater than the line length it defaults back to the
3091
- line length. """
3135
+ `PositionEncodingKind`. """
3092
3136
3093
3137
3094
3138
class SelectionRangeOptions (TypedDict ):
@@ -3597,6 +3641,15 @@ class InlineCompletionOptions(TypedDict):
3597
3641
workDoneProgress : NotRequired [bool ]
3598
3642
3599
3643
3644
+ class TextDocumentContentOptions (TypedDict ):
3645
+ """ Text document content provider options.
3646
+
3647
+ @since 3.18.0
3648
+ @proposed """
3649
+ schemes : List [str ]
3650
+ """ The schemes for which the server provides content. """
3651
+
3652
+
3600
3653
class Registration (TypedDict ):
3601
3654
""" General parameters to register for a notification or to register a provider. """
3602
3655
id : str
@@ -3790,8 +3843,9 @@ class Diagnostic(TypedDict):
3790
3843
range : 'Range'
3791
3844
""" The range at which the message applies """
3792
3845
severity : NotRequired ['DiagnosticSeverity' ]
3793
- """ The diagnostic's severity. Can be omitted. If omitted it is up to the
3794
- client to interpret diagnostics as error, warning, info or hint. """
3846
+ """ The diagnostic's severity. To avoid interpretation mismatches when a
3847
+ server is used with different clients it is highly recommended that servers
3848
+ always provide a severity value. """
3795
3849
code : NotRequired [Union [int , str ]]
3796
3850
""" The diagnostic's code, which usually appear in the user interface. """
3797
3851
codeDescription : NotRequired ['CodeDescription' ]
@@ -4482,6 +4536,11 @@ class WorkspaceOptions(TypedDict):
4482
4536
""" The server is interested in notifications/requests for operations on files.
4483
4537
4484
4538
@since 3.16.0 """
4539
+ textDocumentContent : NotRequired [Union ['TextDocumentContentOptions' , 'TextDocumentContentRegistrationOptions' ]]
4540
+ """ The server supports the `workspace/textDocumentContent` request.
4541
+
4542
+ @since 3.18.0
4543
+ @proposed """
4485
4544
4486
4545
4487
4546
class TextDocumentContentChangePartial (TypedDict ):
@@ -4701,6 +4760,11 @@ class WorkspaceClientCapabilities(TypedDict):
4701
4760
4702
4761
@since 3.18.0
4703
4762
@proposed """
4763
+ textDocumentContent : NotRequired ['TextDocumentContentClientCapabilities' ]
4764
+ """ Capabilities specific to the `workspace/textDocumentContent` request.
4765
+
4766
+ @since 3.18.0
4767
+ @proposed """
4704
4768
4705
4769
4706
4770
class TextDocumentClientCapabilities (TypedDict ):
@@ -4924,8 +4988,10 @@ class TextDocumentFilterLanguage(TypedDict):
4924
4988
""" A language id, like `typescript`. """
4925
4989
scheme : NotRequired [str ]
4926
4990
""" A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. """
4927
- pattern : NotRequired [str ]
4928
- """ A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. """
4991
+ pattern : NotRequired ['GlobPattern' ]
4992
+ """ A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
4993
+
4994
+ @since 3.18.0 - support for relative patterns. """
4929
4995
4930
4996
4931
4997
class TextDocumentFilterScheme (TypedDict ):
@@ -4936,8 +5002,10 @@ class TextDocumentFilterScheme(TypedDict):
4936
5002
""" A language id, like `typescript`. """
4937
5003
scheme : str
4938
5004
""" A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. """
4939
- pattern : NotRequired [str ]
4940
- """ A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. """
5005
+ pattern : NotRequired ['GlobPattern' ]
5006
+ """ A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
5007
+
5008
+ @since 3.18.0 - support for relative patterns. """
4941
5009
4942
5010
4943
5011
class TextDocumentFilterPattern (TypedDict ):
@@ -4948,8 +5016,10 @@ class TextDocumentFilterPattern(TypedDict):
4948
5016
""" A language id, like `typescript`. """
4949
5017
scheme : NotRequired [str ]
4950
5018
""" A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. """
4951
- pattern : str
4952
- """ A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples. """
5019
+ pattern : 'GlobPattern'
5020
+ """ A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
5021
+
5022
+ @since 3.18.0 - support for relative patterns. """
4953
5023
4954
5024
4955
5025
class NotebookDocumentFilterNotebookType (TypedDict ):
@@ -4960,7 +5030,7 @@ class NotebookDocumentFilterNotebookType(TypedDict):
4960
5030
""" The type of the enclosing notebook. """
4961
5031
scheme : NotRequired [str ]
4962
5032
""" A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. """
4963
- pattern : NotRequired [str ]
5033
+ pattern : NotRequired ['GlobPattern' ]
4964
5034
""" A glob pattern. """
4965
5035
4966
5036
@@ -4972,7 +5042,7 @@ class NotebookDocumentFilterScheme(TypedDict):
4972
5042
""" The type of the enclosing notebook. """
4973
5043
scheme : str
4974
5044
""" A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. """
4975
- pattern : NotRequired [str ]
5045
+ pattern : NotRequired ['GlobPattern' ]
4976
5046
""" A glob pattern. """
4977
5047
4978
5048
@@ -4984,7 +5054,7 @@ class NotebookDocumentFilterPattern(TypedDict):
4984
5054
""" The type of the enclosing notebook. """
4985
5055
scheme : NotRequired [str ]
4986
5056
""" A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. """
4987
- pattern : str
5057
+ pattern : 'GlobPattern'
4988
5058
""" A glob pattern. """
4989
5059
4990
5060
@@ -5188,6 +5258,15 @@ class FoldingRangeWorkspaceClientCapabilities(TypedDict):
5188
5258
@proposed """
5189
5259
5190
5260
5261
+ class TextDocumentContentClientCapabilities (TypedDict ):
5262
+ """ Client capabilities for a text document content provider.
5263
+
5264
+ @since 3.18.0
5265
+ @proposed """
5266
+ dynamicRegistration : NotRequired [bool ]
5267
+ """ Text document content provider supports dynamic registration. """
5268
+
5269
+
5191
5270
class TextDocumentSyncClientCapabilities (TypedDict ):
5192
5271
dynamicRegistration : NotRequired [bool ]
5193
5272
""" Whether text document synchronization supports dynamic registration. """
@@ -5376,6 +5455,11 @@ class CodeLensClientCapabilities(TypedDict):
5376
5455
""" The client capabilities of a {@link CodeLensRequest}. """
5377
5456
dynamicRegistration : NotRequired [bool ]
5378
5457
""" Whether code lens supports dynamic registration. """
5458
+ resolveSupport : NotRequired ['ClientCodeLensResolveOptions' ]
5459
+ """ Whether the client supports resolving additional code lens
5460
+ properties via a separate `codeLens/resolve` request.
5461
+
5462
+ @since 3.18.0 """
5379
5463
5380
5464
5381
5465
class DocumentLinkClientCapabilities (TypedDict ):
@@ -5847,6 +5931,12 @@ class ClientCodeActionResolveOptions(TypedDict):
5847
5931
""" The properties that a client can resolve lazily. """
5848
5932
5849
5933
5934
+ class ClientCodeLensResolveOptions (TypedDict ):
5935
+ """ @since 3.18.0 """
5936
+ properties : List [str ]
5937
+ """ The properties that a client can resolve lazily. """
5938
+
5939
+
5850
5940
class ClientFoldingRangeKindOptions (TypedDict ):
5851
5941
""" @since 3.18.0 """
5852
5942
valueSet : NotRequired [List ['FoldingRangeKind' ]]
0 commit comments