Skip to content

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
class Completion(Event):
    """The completion request is sent from the client to the server to compute completion items at a given cursor position.

    Args:
        message_id (Optional[Id]): The message ID.
        completion_list (Optional[CompletionList]): The completion list.
    """

    message_id: Id
    completion_list: t.Optional[CompletionList]

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
class ConfigurationRequest(ServerRequest):
    """The configuration request is sent from the client to the server to fetch configuration settings.

    Methods:
        reply: Reply to the ConfigurationRequest with configuration items.

    Args:
        message_id (Optional[Id]): The message ID.
        result (List[ConfigurationItem]): The configuration items.
    """

    items: t.List[ConfigurationItem]

    def reply(self, result: t.List[t.Any] = []) -> None:
        """
        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.
        """
        self._client._send_response(id=self._id, result=result)

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
def reply(self, result: t.List[t.Any] = []) -> None:
    """
    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.
    """
    self._client._send_response(id=self._id, result=result)

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
class Declaration(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.

    Args:
        message_id (Optional[Id]): The message ID.
        result (Union[Location, List[Union[Location, LocationLink]], None]): The declaration location.
    """

    result: t.Union[Location, t.List[t.Union[Location, LocationLink]], None]

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
class Definition(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.

    Args:
        message_id (Optional[Id]): The message ID.
        result (Union[Location, List[Union[Location, LocationLink]], None]): The definition location.
    """

    message_id: t.Optional[Id]
    result: t.Union[Location, t.List[t.Union[Location, LocationLink]], None]

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
class DocumentFormatting(Event):
    """The document formatting request is sent from the client to the server to format a whole document.

    Args:
        message_id (Optional[Id]): The message ID.
        result (List[TextEdit]): The text edits.
    """

    message_id: t.Optional[Id]
    result: t.Union[t.List[TextEdit], None]

Event

Bases: BaseModel

Base class for all events.

Source code in tarts\events.py
42
43
44
45
class Event(BaseModel):
    """Base class for all events."""

    pass

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
class Hover(Event):
    """The hover request is sent from the client to the server to request hover information at a given text document position.

    Args:
        message_id (Optional[Id]): The message ID.
        contents (Union[List[Union[MarkedString, str]], MarkedString, MarkupContent, str]): The hover contents.
        range (Optional[Range]): The hover range.
    """

    message_id: t.Optional[Id]  # custom...
    contents: t.Union[
        t.List[t.Union[MarkedString, str]], MarkedString, MarkupContent, str
    ]
    range: t.Optional[Range]

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
class Implementation(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.

    Args:
        message_id (Optional[Id]): The message ID.
        result (Union[Location, List[Union[Location, LocationLink]], None]): The implementation location.
    """

    result: t.Union[Location, t.List[t.Union[Location, LocationLink]], None]

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
class Initialized(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.

    Args:
        capabilities (JSONDict): The capabilities of the client (editor).
    """

    capabilities: JSONDict

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
class LogMessage(ServerNotification):
    """The log message notification is sent from the server to the client to ask the client to log a particular message.

    Args:
        type (MessageType): The message type.
        message (str): The message to be logged.
    """

    type: MessageType
    message: str

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
class MCallHierarchItems(Event):
    """The call hierarchy request is sent from the client to the server to resolve items for a given text document position.

    Args:
        message_id (Optional[Id]): The message ID.
        result (Union[List[CallHierarchyItem], None]): The call hierarchy items.
    """

    result: t.Union[t.List[CallHierarchyItem], None]

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
class MDocumentSymbols(Event):
    """The document symbols request is sent from the client to the server to return symbols of a given text document.

    Args:
        message_id (Optional[Id]): The message ID.
        result (Union[List[SymbolInformation], List[DocumentSymbol], None]): The symbols.
    """

    message_id: t.Optional[Id]
    result: t.Union[t.List[SymbolInformation], t.List[DocumentSymbol], None]

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
class MFoldingRanges(Event):
    """The folding ranges request is sent from the client to the server to return all folding ranges found in a given text document.

    Args:
        message_id (Optional[Id]): The message ID.
        result (List[FoldingRange]): The folding ranges.
    """

    message_id: t.Optional[Id]
    result: t.Optional[t.List[FoldingRange]]

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
class MInlayHints(Event):
    """The inlay hints request is sent from the client to the server to return inlay hints for a specific file.

    Args:
        message_id (Optional[Id]): The message ID.
        result (List[InlayHint]): The inlay hints.
    """

    message_id: t.Optional[Id]
    result: t.Optional[t.List[InlayHint]]

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
class MWorkspaceSymbols(Event):
    """The workspace symbols request is sent from the client to the server to list project-wide symbols matching the query string.

    Args:
        message_id (Optional[Id]): The message ID.
        result (List[SymbolInformation]): The symbols.
    """

    result: t.Union[t.List[SymbolInformation], None]

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
class Progress(ServerNotification):
    """Base class for all progress notifications.

    Args:
        token (ProgressToken): The progress token.
        value (ProgressValue): The progress value.
    """

    token: ProgressToken
    value: ProgressValue

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
class PublishDiagnostics(ServerNotification):
    """The publish diagnostics notification is sent from the server to the client to signal results of validation runs.

    Args:
        uri (str): The URI for which diagnostic information is reported.
        version (Optional[int]): The version number of the document the diagnostics are published for.
        diagnostics (List[Diagnostic]): The diagnostics.
    """

    uri: str
    version: t.Optional[int]
    diagnostics: t.List[Diagnostic]

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
class References(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.

    Args:
        message_id (Optional[Id]): The message ID.
        result (List[Location]): The references.
    """

    result: t.Union[t.List[Location], None]

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
class RegisterCapabilityRequest(ServerRequest):
    """The register capability request is sent from the client to the server to register a capability.

    Methods:
        reply: Reply to the RegisterCapabilityRequest.

    Args:
        registrations (List[Registration]): The registrations.
    """

    registrations: t.List[Registration]

    def reply(self) -> None:
        """Reply to the RegisterCapabilityRequest."""
        self._client._send_response(id=self._id, result={})

reply()

Reply to the RegisterCapabilityRequest.

Source code in tarts\events.py
448
449
450
def reply(self) -> None:
    """Reply to the RegisterCapabilityRequest."""
    self._client._send_response(id=self._id, result={})

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
class ResponseError(Event):
    """Base class for all response errors.

    Args:
        message_id (Optional[Id]): The message ID.
        code (int): The error code.
        message (str): The error message.
        data (Union[str, int, float, bool, List[Any], Dict[str, Any], None]): The error data.
    """

    message_id: t.Optional[Id]
    code: int
    message: str
    data: t.Optional[t.Union[str, int, float, bool, t.List[t.Any], JSONDict, None]]

ServerNotification

Bases: Event

Base class for all server notifications.

Source code in tarts\events.py
76
77
78
79
class ServerNotification(Event):
    """Base class for all server notifications."""

    pass

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
class ServerRequest(Event):
    """Base class for all server requests.

    Args:
        _client (Client): The client instance.
        _id (Id): The request ID.
    """

    _client: Client = PrivateAttr()
    _id: Id = PrivateAttr()

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
class ShowMessage(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.

    Args:
        type (MessageType): The message type.
        message (str): The message to be shown.
    """

    type: MessageType
    message: str

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
class ShowMessageRequest(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:
        reply: Reply to the ShowMessageRequest with the user's selection.

    Args:
        type (MessageType): The message type.
        message (str): The message to be shown.
        actions (Optional[List[MessageActionItem]]): The actions to be shown.
    """

    type: MessageType
    message: str
    actions: t.Optional[t.List[MessageActionItem]]

    def reply(self, action: t.Optional[MessageActionItem] = None) -> 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.
        """
        self._client._send_response(
            id=self._id, result=action.dict() if action is not None else None
        )

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
def reply(self, action: t.Optional[MessageActionItem] = None) -> 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.
    """
    self._client._send_response(
        id=self._id, result=action.dict() if action is not None else None
    )

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
class Shutdown(Event):
    """The shutdown request is sent from the client to the server. It asks the server to shut down."""

    pass

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
class SignatureHelp(Event):
    """The signature help request is sent from the client to the server to request signature information at a given cursor position.

    Methods:
        get_hint_str: Get the signature help hint string.

    Args:
        message_id (Optional[Id]): The message ID.
        signatures (List[SignatureInformation]): The signatures.
        activeSignature (Optional[int]): The active signature.
        activeParameter (Optional[int]): The active parameter.
    """

    message_id: t.Optional[Id]  # custom...
    signatures: t.List[SignatureInformation]
    activeSignature: t.Optional[int]
    activeParameter: t.Optional[int]

    def get_hint_str(self) -> t.Optional[str]:
        """Get the signature help hint string."""

        if len(self.signatures) == 0:
            return None
        active_sig = self.activeSignature or 0
        sig = self.signatures[active_sig]
        return sig.label

get_hint_str()

Get the signature help hint string.

Source code in tarts\events.py
297
298
299
300
301
302
303
304
def get_hint_str(self) -> t.Optional[str]:
    """Get the signature help hint string."""

    if len(self.signatures) == 0:
        return None
    active_sig = self.activeSignature or 0
    sig = self.signatures[active_sig]
    return sig.label

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
class TypeDefinition(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.

    Args:
        message_id (Optional[Id]): The message ID.
        result (Union[Location, List[Union[Location, LocationLink]], None]): The type definition location.
    """

    result: t.Union[Location, t.List[t.Union[Location, LocationLink]], None]

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
class WillSaveWaitUntilEdits(Event):
    """The will save wait until edits request is sent from the client to the server before the document is actually saved.

    Args:
        message_id (Optional[Id]): The message ID.
        edits (Optional[List[TextEdit]]): The edits.
    """

    edits: t.Optional[t.List[TextEdit]]

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
class WorkDoneProgress(Progress):
    """Base class for all work done progress notifications.

    Args:
        token (ProgressToken): The progress token.
        value (ProgressValue): The progress value.
    """

    pass

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
class WorkDoneProgressBegin(WorkDoneProgress):
    """The work done progress begin notification is sent from the server to the client to begin a progress.

    Args:
        value (WorkDoneProgressBeginValue): The progress value.
    """

    value: WorkDoneProgressBeginValue

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
class WorkDoneProgressCreate(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:
        reply: Reply to the WorkDoneProgressCreate request.

    Args:
        token (ProgressToken): The progress token."""

    token: ProgressToken

    def reply(self) -> None:
        """Reply to the WorkDoneProgressCreate request."""

        self._client._send_response(id=self._id, result=None)

reply()

Reply to the WorkDoneProgressCreate request.

Source code in tarts\events.py
165
166
167
168
def reply(self) -> None:
    """Reply to the WorkDoneProgressCreate request."""

    self._client._send_response(id=self._id, result=None)

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
class WorkDoneProgressEnd(WorkDoneProgress):
    """The work done progress end notification is sent from the server to the client to end a progress.

    Args:
        value (WorkDoneProgressEndValue): The progress value.
    """

    value: WorkDoneProgressEndValue

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
class WorkDoneProgressReport(WorkDoneProgress):
    """The work done progress report notification is sent from the server to the client to report progress.

    Args:
        value (WorkDoneProgressReportValue): The progress value.
    """

    value: WorkDoneProgressReportValue

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
class WorkspaceEdit(Event):
    """The workspace edit is sent from the server to the client to modify resource on the client side.

    Args:
        message_id (Optional[Id]): The message ID.
        changes (Optional[Dict[str, List[TextEdit]]]): The changes.
        documentChanges (Optional[List[TextDocumentEdit]]): The document changes.
    """

    message_id: t.Optional[Id]
    changes: t.Optional[t.Dict[str, TextEdit]]
    documentChanges: t.Optional[t.List[TextDocumentEdit]]

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
class WorkspaceFolders(ServerRequest):
    """The workspace folders request is sent from the client to the server to fetch the workspace folders.

    Methods:
        reply: Reply to the WorkspaceFolders with workspace

    Args:
        message_id (Optional[Id]): The message ID.
        result (Optional[List[WorkspaceFolder]]): The workspace folders.
    """

    result: t.Optional[t.List[WorkspaceFolder]]

    def reply(self, folders: t.Optional[t.List[WorkspaceFolder]] = None) -> 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.
        """
        self._client._send_response(
            id=self._id,
            result=[f.dict() for f in folders] if folders is not None else None,
        )

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
def reply(self, folders: t.Optional[t.List[WorkspaceFolder]] = None) -> 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.
    """
    self._client._send_response(
        id=self._id,
        result=[f.dict() for f in folders] if folders is not None else None,
    )