Table of Contents

Class SessionCompletionParams

Namespace
RDCore.SDK.Platform.Protocol
Assembly
RDCore.SDK.dll

Request for rdcore/session/completion: a client asks the language server what can be written at a position of a module it supplies - the completion list of a line typed at a prompt.

[Method("rdcore/session/completion", Direction.ClientToServer)]
public record SessionCompletionParams : IRequest, IRequest<Unit>, IRequest<CompletionList>, IBaseRequest, IEquatable<SessionCompletionParams>
Inheritance
SessionCompletionParams
Implements
IRequest
IRequest<Unit>
IRequest<CompletionList>
IBaseRequest
Inherited Members

Remarks

The counterpart to AnalyzeSessionParams for completion: an editor asks LSP's own textDocument/completion of a document it has open, and a shell has no document for the line it is typing - the line is not in the program until it is entered, and an immediate statement never is. The list is the one textDocument/completion answers with, of the module as it is supplied: nothing of it is sent to the environment host.

Properties

Character

The zero-based character of Line the cursor is at, in UTF-16 code units: what is before it is what the list completes.

public int Character { get; init; }

Property Value

int

Command

The verb of the client that the line at its prompt starts with, and what is typed after it - for a line that is no code of the module but a command of the client: its arguments are completed as the verb's registered descriptor describes them (SessionCommandsParams), and Line and Character are not read. null for a line of code.

public SessionCommandCompletion? Command { get; init; }

Property Value

SessionCommandCompletion

Remarks

Source is still the module the command acts on: the lines a line number names, and where an expression is evaluated, are its.

Line

The zero-based line of Source the cursor is on.

public int Line { get; init; }

Property Value

int

ModuleName

The module's programmatic name: the module of the workspace by that name is the one the source stands for, and the workspace's other modules are what its names are bound among.

public string ModuleName { get; init; }

Property Value

string

Source

The complete source of the module, the line that is being typed in it.

public string Source { get; init; }

Property Value

string