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
PATHby 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> -
initializationOptionssent with theinitializerequest.final - languageId → String?
-
The
languageIdsent intextDocument/didOpen. Defaults to the file's extension without the dot (.dart→dart).final - name → String
-
Server name (the
serversmap 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/configurationpulls and pushed viaworkspace/didChangeConfigurationafter 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 inoverrideJsonwin, 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
serversentry from JSON. Returns null when required fields are missing or invalid (omp'snormalizeServerConfig).