Table of Contents

Class LiveSettingsProtocol

Namespace
RDCore.SDK.Server.Configuration
Assembly
RDCore.SDK.dll

How the live settings travel between a client and a server (LSP 3.17 §Configuration Request): the configuration section rdcore, whose keys are those under Root - rdcore.Server.Verbose is Configuration:Server:Verbose.

public static class LiveSettingsProtocol
Inheritance
LiveSettingsProtocol
Inherited Members

Remarks

A server asks for the section with workspace/configuration when it is initialized, and again whenever its client says the configuration changed (workspace/didChangeConfiguration, whose own settings are not read: the server asks). A client answers with what its component hands down (Current): a JSON object of sections, a list of texts as an array.

Fields

Section

The configuration section of the platform's settings.

public const string Section = "rdcore"

Field Value

string

Properties

Changed

What a client says when the live settings changed (workspace/didChangeConfiguration): settings that are null, so that the server asks for the section - settings that are anything else, an empty object included, are what the server takes them to be, and it asks nothing.

public static DidChangeConfigurationParams Changed { get; }

Property Value

DidChangeConfigurationParams

Methods

Answer(ConfigurationParams, IReadOnlyDictionary<string, string>)

What a client answers a workspace/configuration request with: for each item, the section it names of settings - all of them for the item that names no section, or Section - or null for a section that is no setting's.

public static Container<JToken> Answer(ConfigurationParams request, IReadOnlyDictionary<string, string> settings)

Parameters

request ConfigurationParams

The request.

settings IReadOnlyDictionary<string, string>

What the client's component hands down, by the keys under Root, separated by :.

Returns

Container<JToken>

Read(IConfiguration)

What a client said the settings are, as a server's configuration has them once it asked: the keys of Section, under Root.

public static Dictionary<string, string> Read(IConfiguration configuration)

Parameters

configuration IConfiguration

The configuration the client's answers are in (OmniSharp's ILanguageServerConfiguration).

Returns

Dictionary<string, string>