Table of Contents

Class SdkWorkspaceOptions

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

Workspace-level configuration settings, bound from appsettings.json or overridden from command-line arguments.

public record SdkWorkspaceOptions : IEquatable<SdkWorkspaceOptions>
Inheritance
SdkWorkspaceOptions
Implements
Inherited Members

Properties

DefaultLocation

The default location of RDCore workspaces (source files) on disk.

public string DefaultLocation { get; set; }

Property Value

string

Remarks

👉 This location is used as a root when the WorkspaceUri is relative.

EnableFileSystemWatchers

Whether the language server watches the workspace's files itself, for a client that does not: when false, it never does.

[Setting(SettingReach.NextStart)]
public bool EnableFileSystemWatchers { get; set; }

Property Value

bool

Remarks

The client owns the file system. A client that says it watches files (workspace.didChangeWatchedFiles, LSP 3.17) tells the server what changed outside the editor, and the server watches nothing. Only for a client that does not say so does the server watch the workspace's source files and its .rdproj, and make the workspace what they are when one changes outside the editor. This setting turns that off - a client that keeps the file system to itself, a share where watching is costly - and a file changed outside the editor is then read when the server next starts. The setting is read when the workspace is loaded.

Language

The identifier of the language the workspace is written in (Id): vba (RD-VBA, the default), vb6 or basic.

public string Language { get; set; }

Property Value

string

Remarks

The language is what the platform's components agree on about the dialect, so a client says it of the servers it starts - and of the server it connects to, in the initializationOptions of its initialize request (RDCoreInitializationOptions). It decides what is built from the workspace: where the variable an undeclared name declares lives (ImplicitDeclarationScope), and which statements exist. The standard library is not one of them: it is VBA whatever the language (LibraryName).

SupportedLanguage

The language Language names.

public SupportedLanguage SupportedLanguage { get; }

Property Value

SupportedLanguage

Exceptions

InvalidOperationException

Language is not the identifier of a language the platform serves.

WorkspaceUri

The location of the workspace to work with if none is supplied.

public string WorkspaceUri { get; set; }

Property Value

string

Remarks

This setting is for client applications. The workspace location a LSP server application should work with should be supplied by a command-line argument or as a parameter in the Initialize request.
⚠️ If a workspace Uri is not supplied, a server application should exit with an error code.