API Reference
Events
Completion
Bases: Event
The completion request is sent from the client to the server to compute completion items at a given cursor position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
completion_list |
Optional[CompletionList]
|
The completion list. |
required |
Source code in tarts\events.py
225 226 227 228 229 230 231 232 233 234 | |
ConfigurationRequest
Bases: ServerRequest
The configuration request is sent from the client to the server to fetch configuration settings.
Methods:
| Name | Description |
|---|---|
reply |
Reply to the ConfigurationRequest with configuration items. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
List[ConfigurationItem]
|
The configuration items. |
required |
Source code in tarts\events.py
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | |
reply(result=[])
Reply to the ConfigurationRequest with configuration items.
No bytes are actually returned from this method, the reply's bytes are added to the client's internal send buffer.
Source code in tarts\events.py
504 505 506 507 508 509 510 511 | |
Declaration
Bases: Event
The declaration request is sent from the client to the server to resolve the declaration location of a symbol at a given text document position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
Union[Location, List[Union[Location, LocationLink]], None]
|
The declaration location. |
required |
Source code in tarts\events.py
414 415 416 417 418 419 420 421 422 | |
Definition
Bases: Event
The definition request is sent from the client to the server to resolve the definition location of a symbol at a given text document position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
Union[Location, List[Union[Location, LocationLink]], None]
|
The definition location. |
required |
Source code in tarts\events.py
307 308 309 310 311 312 313 314 315 316 | |
DocumentFormatting
Bases: Event
The document formatting request is sent from the client to the server to format a whole document.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
List[TextEdit]
|
The text edits. |
required |
Source code in tarts\events.py
453 454 455 456 457 458 459 460 461 462 | |
Event
Bases: BaseModel
Base class for all events.
Source code in tarts\events.py
42 43 44 45 | |
Hover
Bases: Event
The hover request is sent from the client to the server to request hover information at a given text document position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
contents |
Union[List[Union[MarkedString, str]], MarkedString, MarkupContent, str]
|
The hover contents. |
required |
range |
Optional[Range]
|
The hover range. |
required |
Source code in tarts\events.py
263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
Implementation
Bases: Event
The implementation request is sent from the client to the server to resolve the implementation location of a symbol at a given text document position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
Union[Location, List[Union[Location, LocationLink]], None]
|
The implementation location. |
required |
Source code in tarts\events.py
356 357 358 359 360 361 362 363 364 | |
Initialized
Bases: Event
The initialized notification is sent from the client to the server after the client received the result of the initialize request but before the client is sending any other request or notification to the server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
capabilities |
JSONDict
|
The capabilities of the client (editor). |
required |
Source code in tarts\events.py
82 83 84 85 86 87 88 89 90 | |
LogMessage
Bases: ServerNotification
The log message notification is sent from the server to the client to ask the client to log a particular message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type |
MessageType
|
The message type. |
required |
message |
str
|
The message to be logged. |
required |
Source code in tarts\events.py
141 142 143 144 145 146 147 148 149 150 | |
MCallHierarchItems
Bases: Event
The call hierarchy request is sent from the client to the server to resolve items for a given text document position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
Union[List[CallHierarchyItem], None]
|
The call hierarchy items. |
required |
Source code in tarts\events.py
345 346 347 348 349 350 351 352 353 | |
MDocumentSymbols
Bases: Event
The document symbols request is sent from the client to the server to return symbols of a given text document.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
Union[List[SymbolInformation], List[DocumentSymbol], None]
|
The symbols. |
required |
Source code in tarts\events.py
402 403 404 405 406 407 408 409 410 411 | |
MFoldingRanges
Bases: Event
The folding ranges request is sent from the client to the server to return all folding ranges found in a given text document.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
List[FoldingRange]
|
The folding ranges. |
required |
Source code in tarts\events.py
378 379 380 381 382 383 384 385 386 387 | |
MInlayHints
Bases: Event
The inlay hints request is sent from the client to the server to return inlay hints for a specific file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
List[InlayHint]
|
The inlay hints. |
required |
Source code in tarts\events.py
390 391 392 393 394 395 396 397 398 399 | |
MWorkspaceSymbols
Bases: Event
The workspace symbols request is sent from the client to the server to list project-wide symbols matching the query string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
List[SymbolInformation]
|
The symbols. |
required |
Source code in tarts\events.py
367 368 369 370 371 372 373 374 375 | |
Progress
Bases: ServerNotification
Base class for all progress notifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
token |
ProgressToken
|
The progress token. |
required |
value |
ProgressValue
|
The progress value. |
required |
Source code in tarts\events.py
171 172 173 174 175 176 177 178 179 180 | |
PublishDiagnostics
Bases: ServerNotification
The publish diagnostics notification is sent from the server to the client to signal results of validation runs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri |
str
|
The URI for which diagnostic information is reported. |
required |
version |
Optional[int]
|
The version number of the document the diagnostics are published for. |
required |
diagnostics |
List[Diagnostic]
|
The diagnostics. |
required |
Source code in tarts\events.py
249 250 251 252 253 254 255 256 257 258 259 260 | |
References
Bases: Event
The references request is sent from the client to the server to resolve project-wide references for the symbol denoted by the given text document position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
List[Location]
|
The references. |
required |
Source code in tarts\events.py
334 335 336 337 338 339 340 341 342 | |
RegisterCapabilityRequest
Bases: ServerRequest
The register capability request is sent from the client to the server to register a capability.
Methods:
| Name | Description |
|---|---|
reply |
Reply to the RegisterCapabilityRequest. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
registrations |
List[Registration]
|
The registrations. |
required |
Source code in tarts\events.py
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | |
reply()
Reply to the RegisterCapabilityRequest.
Source code in tarts\events.py
448 449 450 | |
ResponseError
Bases: Event
Base class for all response errors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
code |
int
|
The error code. |
required |
message |
str
|
The error message. |
required |
data |
Union[str, int, float, bool, List[Any], Dict[str, Any], None]
|
The error data. |
required |
Source code in tarts\events.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
ServerNotification
Bases: Event
Base class for all server notifications.
Source code in tarts\events.py
76 77 78 79 | |
ServerRequest
Bases: Event
Base class for all server requests.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
_client |
Client
|
The client instance. |
required |
_id |
Id
|
The request ID. |
required |
Source code in tarts\events.py
64 65 66 67 68 69 70 71 72 73 | |
ShowMessage
Bases: ServerNotification
The show message notification is sent from a server to a client to ask the client to display a particular message in the user interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type |
MessageType
|
The message type. |
required |
message |
str
|
The message to be shown. |
required |
Source code in tarts\events.py
99 100 101 102 103 104 105 106 107 108 109 | |
ShowMessageRequest
Bases: ServerRequest
The show message request is sent from a server to a client to ask the client to display a particular message in the user interface.
Methods:
| Name | Description |
|---|---|
reply |
Reply to the ShowMessageRequest with the user's selection. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type |
MessageType
|
The message type. |
required |
message |
str
|
The message to be shown. |
required |
actions |
Optional[List[MessageActionItem]]
|
The actions to be shown. |
required |
Source code in tarts\events.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
reply(action=None)
Reply to the ShowMessageRequest with the user's selection.
No bytes are actually returned from this method, the reply's bytes are added to the client's internal send buffer.
Source code in tarts\events.py
129 130 131 132 133 134 135 136 137 138 | |
Shutdown
Bases: Event
The shutdown request is sent from the client to the server. It asks the server to shut down.
Source code in tarts\events.py
93 94 95 96 | |
SignatureHelp
Bases: Event
The signature help request is sent from the client to the server to request signature information at a given cursor position.
Methods:
| Name | Description |
|---|---|
get_hint_str |
Get the signature help hint string. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
signatures |
List[SignatureInformation]
|
The signatures. |
required |
activeSignature |
Optional[int]
|
The active signature. |
required |
activeParameter |
Optional[int]
|
The active parameter. |
required |
Source code in tarts\events.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | |
get_hint_str()
Get the signature help hint string.
Source code in tarts\events.py
297 298 299 300 301 302 303 304 | |
TypeDefinition
Bases: Event
The type definition request is sent from the client to the server to resolve the type definition location of a symbol at a given text document position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
Union[Location, List[Union[Location, LocationLink]], None]
|
The type definition location. |
required |
Source code in tarts\events.py
425 426 427 428 429 430 431 432 433 | |
WillSaveWaitUntilEdits
Bases: Event
The will save wait until edits request is sent from the client to the server before the document is actually saved.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
edits |
Optional[List[TextEdit]]
|
The edits. |
required |
Source code in tarts\events.py
238 239 240 241 242 243 244 245 246 | |
WorkDoneProgress
Bases: Progress
Base class for all work done progress notifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
token |
ProgressToken
|
The progress token. |
required |
value |
ProgressValue
|
The progress value. |
required |
Source code in tarts\events.py
183 184 185 186 187 188 189 190 191 | |
WorkDoneProgressBegin
Bases: WorkDoneProgress
The work done progress begin notification is sent from the server to the client to begin a progress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value |
WorkDoneProgressBeginValue
|
The progress value. |
required |
Source code in tarts\events.py
194 195 196 197 198 199 200 201 | |
WorkDoneProgressCreate
Bases: ServerRequest
The work done progress create request is sent from the server to the client to ask the client to create a work done progress.
Methods:
| Name | Description |
|---|---|
reply |
Reply to the WorkDoneProgressCreate request. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
token |
ProgressToken
|
The progress token. |
required |
Source code in tarts\events.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
reply()
Reply to the WorkDoneProgressCreate request.
Source code in tarts\events.py
165 166 167 168 | |
WorkDoneProgressEnd
Bases: WorkDoneProgress
The work done progress end notification is sent from the server to the client to end a progress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value |
WorkDoneProgressEndValue
|
The progress value. |
required |
Source code in tarts\events.py
214 215 216 217 218 219 220 221 | |
WorkDoneProgressReport
Bases: WorkDoneProgress
The work done progress report notification is sent from the server to the client to report progress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value |
WorkDoneProgressReportValue
|
The progress value. |
required |
Source code in tarts\events.py
204 205 206 207 208 209 210 211 | |
WorkspaceEdit
Bases: Event
The workspace edit is sent from the server to the client to modify resource on the client side.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
changes |
Optional[Dict[str, List[TextEdit]]]
|
The changes. |
required |
documentChanges |
Optional[List[TextDocumentEdit]]
|
The document changes. |
required |
Source code in tarts\events.py
319 320 321 322 323 324 325 326 327 328 329 330 | |
WorkspaceFolders
Bases: ServerRequest
The workspace folders request is sent from the client to the server to fetch the workspace folders.
Methods:
| Name | Description |
|---|---|
reply |
Reply to the WorkspaceFolders with workspace |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_id |
Optional[Id]
|
The message ID. |
required |
result |
Optional[List[WorkspaceFolder]]
|
The workspace folders. |
required |
Source code in tarts\events.py
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | |
reply(folders=None)
Reply to the WorkspaceFolder with workspace folders.
No bytes are actually returned from this method, the reply's bytes are added to the client's internal send buffer.
Source code in tarts\events.py
478 479 480 481 482 483 484 485 486 487 488 | |