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, matchingfileTypesagainst the lowercased extension or the exact basename (omp'sgetServerForFile, 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
pathunderserver: the nearest ancestor directory (starting at the file's directory) containing one of the server's root markers (omp'shasRootMarkerAncestorused as a root locator). Falls back toenv'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.jsonfromenv'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
idleTimeoutMsin.fah/lsp.json).