LspServerConfig class final

One language server definition (omp's ServerConfig, reduced).

Constructors

LspServerConfig({required String name, required String command, List<String> args = const [], List<String> fileTypes = const [], List<String> rootMarkers = const [], Map<String, dynamic> initOptions = const {}, Map<String, dynamic> settings = const {}, bool disabled = false, String? languageId})
Creates an LspServerConfig.
const

Properties

args → List<String>
Command arguments.
final
command → String
Executable to spawn (resolved against PATH by the transport).
final
disabled → bool
Disabled servers are never started.
final
fileTypes → List<String>
File extensions (with dot, e.g. .dart) or exact basenames this server handles.
final
hashCode → int
The hash code for this object.
no setterinherited
initOptions → Map<String, dynamic>
initializationOptions sent with the initialize request.
final
languageId → String?
The languageId sent in textDocument/didOpen. Defaults to the file's extension without the dot (.dart → dart).
final
name → String
Server name (the servers map key).
final
rootMarkers → List<String>
Marker files that identify a workspace root for this server.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
settings → Map<String, dynamic>
Settings answered to workspace/configuration pulls and pushed via workspace/didChangeConfiguration after init.
final

Methods

languageIdFor(String path) → String
Resolves the language id for path (see languageId).
mergedWith(Object? overrideJson) → LspServerConfig?
Merges an override entry over this config (omp's mergeServers): present fields in overrideJson win, absent fields keep the base value. Returns null when the merged result is invalid.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromJson(String name, Object? json) → LspServerConfig?
Parses one servers entry from JSON. Returns null when required fields are missing or invalid (omp's normalizeServerConfig).