Table of Contents

Class RDCoreInitializationOptions

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

What a client says of itself to a server in the initializationOptions of the LSP initialize request. That part of the protocol exists for exactly this: the settings of a server that no standard capability describes.

public sealed record RDCoreInitializationOptions : IEquatable<RDCoreInitializationOptions>
Inheritance
RDCoreInitializationOptions
Implements
Inherited Members

Remarks

For example, the language the workspace is written in: a server cannot tell RD-VBA from VB6 or BASIC by looking at the files, and the dialect decides what it builds (the name of the standard library, where an undeclared name declares its variable, which statements exist at all). A server started with a command line has already been told, and what the client sends here wins.

Properties

AnswersDuringInitialize

Whether the client answers what the server asks its user (LSP 3.17 window/showMessageRequest) before initialize is answered, with a choice or with none, and never with an error.

public bool AnswersDuringInitialize { get; init; }

Property Value

bool

Remarks

LSP allows a server to send window/showMessageRequest while it answers initialize, and a server waits for the answer: what it asks as it loads its workspace, such as whether to regenerate a project file it cannot read, decides what it loads. A client that cannot answer then leaves initialize unanswered for good, and the client waits for that answer: neither side moves again.

A client built on OmniSharp's language client (0.19.9) is such a client, unless it answers with a choice. Until it is initialized, OmniSharp's language client writes no message except the initialize request, the initialized notification and a response with a result, and holds every other one until it is. Error responses are held as well, including the one it answers with when its handler fails, when its user cannot be asked, or when it has no handler for the request at all.

A server asks nothing before initialize is answered of a client that does not say true, nor of one that runs Unattended, and does without the answer, as it does without the answer of a user who did not choose.

Language

The identifier of the language the workspace is written in (Id), or null when the client does not say, which leaves the server's own setting.

public string? Language { get; init; }

Property Value

string

Locale

The language of the client's user interface, as a language tag (fr-CA), which a server speaks to it in: the same as the request's own locale (LSP 3.17 InitializeParams.locale), which the language client a platform's client is built on has no option to send. A server reads the request's locale first; null says none.

public string? Locale { get; init; }

Property Value

string

Unattended

Whether nobody is there to answer what the server would ask the client's user: what the platform handshake's Unattended says, for what the server asks before the handshake.

public bool Unattended { get; init; }

Property Value

bool

Remarks

A server loads its workspace while it answers initialize, and the platform handshake (rdcore/platform/initialize) follows that answer: what the server asks as it loads, such as whether to regenerate a project file it cannot read, it cannot wait for the handshake to know whether to ask. A server asks nothing of a client that says true, and does without the answer, as the handshake's Unattended has it do with a program's dialogs, whatever it says of AnswersDuringInitialize.