LspConfig class final

The resolved server configuration for a workspace (omp's LspConfig).

Constructors

LspConfig({required Map<String, LspServerConfig> servers, Duration idleTimeout = defaultIdleTimeout, List<String> warnings = const []})
Creates an LspConfig.
const
LspConfig.defaults()
The built-in defaults: the Dart analysis server only. Other servers join through .fah/lsp.json.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
idleTimeout Duration
Idle timeout after which unused servers are shut down. Duration.zero disables the sweep.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
servers Map<String, LspServerConfig>
Configured servers by name.
final
warnings List<String>
Non-fatal problems encountered while loading.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serverForFile(String path) LspServerConfig?
Finds the server handling path, matching fileTypes against the lowercased extension or the exact basename (omp's getServerForFile, reduced to the first match; linter ordering is not ported). Disabled servers never match.
toString() String
A string representation of this object.
inherited
workspaceRootFor(ExecutionEnv env, String path, LspServerConfig server) Future<String>
Resolves the workspace root for path under server: the nearest ancestor directory (starting at the file's directory) containing one of the server's root markers (omp's hasRootMarkerAncestor used as a root locator). Falls back to env's cwd.

Operators

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

Static Methods

load(ExecutionEnv env) Future<LspConfig>
Loads the configuration for env: the built-in defaults merged with .fah/lsp.json from env's cwd when present. A malformed config file is reported in warnings and otherwise ignored (never fatal).

Constants

defaultIdleTimeout → const Duration
Default idle timeout: 5 minutes (omp disables the sweep by default; the kanban design calls for idle shutdown, so it is on here and configurable via idleTimeoutMs in .fah/lsp.json).