Skip to main content

Development

API Reference

VS Code extension API coverage in Editor.Land: what works, what no-ops, and what is not yet implemented.

API Reference

Editor.Land implements the VS Code extension API through Cocoon, the Node.js extension host. Extensions written against @types/vscode compile against Cocoon’s stubs without modification. Whether they run correctly depends on which API surfaces they use.


Coverage Status

The API surface is divided into three categories:

Implemented — The API is active in the debug-mountain profile. Extensions using it behave as expected.

Partial — The API is present and callable but not all methods or behaviours are implemented. Some calls may silently no-op or return empty results.

Not implemented — The namespace exists in Cocoon’s type stubs so extensions compile, but the runtime calls do nothing. Extensions that depend on these APIs activate but their features do not work.

NamespaceStatusNotes
vscode.commandsImplementedRegister, execute, command palette
vscode.workspace.fsImplementedRoutes through Mountain’s FS layer via Vine
vscode.window.createTerminalImplementedRoutes through Mountain’s pty layer via Vine
vscode.debugImplementedDAP bridge in Mountain, routes via Vine
vscode.languagesImplementedLSP client via vscode-languageclient
vscode.workspace.getConfigurationImplementedReads workspace and user settings
vscode.window (core)PartialshowInformationMessage, createWebviewPanel, registerTreeDataProvider work; some view APIs unconfirmed
vscode.window.createTreeViewPartialTree data provider registration works; inline actions and welcome content unconfirmed
vscode.tasksPartialTask definition reading works; full task runner execution unconfirmed
vscode.extensionsPartialgetExtension and activate work; some metadata fields unconfirmed
vscode.lmNot implementedLanguage model / Copilot APIs — no-op
vscode.chatNot implementedChat panel APIs — no-op
vscode.notebookNot implementedNotebook document and editor APIs — no-op
vscode.testsNot implementedTest explorer and runner APIs — no-op

Commands

Register a command with vscode.commands.registerCommand:

const Disposable = vscode.commands.registerCommand(
  "MyExtension.SayHello",
  () => {
    vscode.window.showInformationMessage("Hello from Land!");
  },
);

Commands declared in package.json under contributes.commands appear in the command palette. This is one of the more reliably implemented API surfaces.


Configuration

Extensions read settings through the WorkspaceConfiguration API:

const Config = vscode.workspace.getConfiguration("MyExtension");
const FontSize = Config.get<number>("FontSize", 14);

Configuration keys are declared in contributes.configuration in your extension manifest. Land validates configuration values against the JSON Schema you provide. The specific user settings file path has not been independently confirmed — see Configuration for details.


Keybindings

Declare keybindings in contributes.keybindings:

{
  "command": "MyExtension.SayHello",
  "key": "ctrl+shift+h",
  "mac": "cmd+shift+h",
  "when": "editorTextFocus"
}

The when clause uses the same context key syntax as VS Code. Custom context keys set via vscode.commands.executeCommand('setContext', ...) are supported.


Tree Views

Register a tree view provider:

vscode.window.registerTreeDataProvider(
  "MyExtension.TreeView",
  MyTreeDataProvider,
);

Declare the view container and view in contributes.viewsContainers and contributes.views. Tree data provider registration routes through Cocoon’s fiber scheduler. Inline actions and welcome content are not confirmed.


Webview Panels

Create HTML-based UI panels:

const Panel = vscode.window.createWebviewPanel(
  "MyExtension.Preview",
  "Preview",
  vscode.ViewColumn.Beside,
  { enableScripts: true },
);

Panel.webview.html = "<html><body><h1>Preview</h1></body></html>";

Webview panels run in a sandboxed context with a Content Security Policy. Use Panel.webview.postMessage() and Panel.webview.onDidReceiveMessage for bidirectional communication between the extension and the webview.


Language Server Protocol

Land supports LSP servers through the vscode-languageclient package. Point your extension at a language server binary and the LSP client handles initialization, capabilities negotiation, and shutdown. This routes through Cocoon’s vscode.languages implementation, which is one of the more complete API surfaces.


Rust API Documentation

Generated rustdoc output is planned for the Rust crates listed below. The URLs follow the pattern https://Rust.Documentation.*.Editor.Land — these may not yet resolve to hosted documentation. Check the source repositories directly if the links are unavailable.

CrateDescriptionElement
MountainTauri native kernelMountain
EchoWork-stealing task schedulerEcho
CommonShared IPC event type definitionsArchitecture
CommonLibraryShared utility functionsArchitecture
AirBackground update daemonAir
AirLibraryAir shared libraryAir
DownloadBinary download logicAir
SideCarPre-built Node.js binariesArchitecture
MaintainBuild orchestratorContributing
GroveWASM extension host — WASMtime host, gRPC protocol, API surface, and transport layer implemented; primary build integration in progressGrove

See Also