Expand description
Capability providers: file system, process, terminal, and extension host.
§Environment
Dependency injection container that provides thread-safe access to
all Mountain providers through trait-based lookups via the Requires trait.
Component -> Requires<T> -> MountainEnvironment -> Arc<dyn T>MountainEnvironment implements the Environment and Requires traits
from the Common crate. It is constructed once during startup and shared
as Arc<MountainEnvironment> across all subsystems. Provider trait
implementations are generated by ProviderTraitImplMacro to keep
boilerplate minimal.
§Provider Traits Implemented
CommandExecutor, ConfigurationProvider, CustomEditorProvider,
DebugService, DiagnosticManager, DocumentProvider,
FileSystemReader/Writer, FileWatcher, IPCProvider,
KeybindingProvider, LanguageFeatureProviderRegistry,
OutputChannelManager, SearchProvider, SecretProvider,
SourceControlManagementProvider, StatusBarProvider, StorageProvider,
SynchronizationProvider, TerminalProvider, TestController,
TreeViewProvider, UserInterfaceProvider, WebviewProvider,
WorkspaceProvider, WorkspaceEditApplier, ExtensionManagementService.
Providers use CommonError for error reporting. Trait resolution is
compile-time, ensuring type safety with zero runtime overhead.
Modules§
- Command
Provider CommandExecutorprovider: runs shell commands in a managed subprocess.- Configuration
Provider ConfigurationProvider: reads, writes, and watches workspace configuration.- Custom
Editor Provider CustomEditorProvider: registers and resolves custom editor contributions.- Debug
Provider DebugService: manages debug adapter protocol sessions.- Diagnostic
Provider DiagnosticManager: collects and publishes editor diagnostic markers.- Document
Provider DocumentProvider: opens, closes, and tracks text document state.- File
System Provider FileSystemReader/Writer: async file-system read and write operations.- File
Watcher Provider FileWatcher: registers file-system watch patterns and delivers change events.- IPCProvider
IPCProvider: routes IPC messages between the frontend and backend.- Keybinding
Provider KeybindingProvider: resolves keybinding contributions and chord sequences.- Language
Feature Provider LanguageFeatureProviderRegistry: dispatches LSP-like language features.- Mountain
Environment - Main dependency injection container struct implementing all provider traits.
- Output
Provider OutputChannelManager: creates and writes to named output channels.- Provider
Trait Impl Macro - Declarative macro that generates
Requires<dyn T>impl blocks for each provider trait onMountainEnvironment. Invoked asimpl_provider!(CommandExecutor)from the parent file. - Search
Provider SearchProvider: runs workspace-wide text and symbol searches.- Secret
Provider SecretProvider: reads and writes secrets from the platform credential store.- Source
Control Management Provider SourceControlManagementProvider: exposes SCM repository state and actions.- Status
BarProvider StatusBarProvider: creates and updates status bar items.- Storage
Provider StorageProvider: persists extension and workspace state blobs.- Synchronization
Provider SynchronizationProvider: coordinates cross-window state synchronization.- Terminal
Provider TerminalProvider: creates and manages integrated terminal instances.- Test
Provider TestController: registers test run profiles and reports test results.- Tree
View Provider TreeViewProvider: supplies data for tree-view panel contributions.- User
Interface Provider UserInterfaceProvider: drives quick-pick, input-box, and notification UI.- Utility
- Shared helpers used across multiple provider implementations.
Cross-cutting utilities shared by every
Environmentprovider: error mapping, language detection, workspace-trust path validation, and URI parsing. Callers spell the full path (Environment::Utility::ErrorMapping::Fn, etc.) - nopub usere-exports. - Webview
Provider WebviewProvider: creates and manages sandboxed webview panels.- Workspace
Provider WorkspaceProvider: exposes workspace folders, trust state, and edits.