Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

hone-extension

V2 plugin SDK package. Contains the SDK, Rust plugin host, marketplace client, and CLI tooling.

SDK (@hone/sdk)

Base Classes and Interfaces

  • HonePlugin — base class that plugins extend
  • HoneHost — host interface type (capabilities the IDE exposes to plugins)
  • HoneHostImpl — host implementation
  • CanvasContext — custom UI rendering context for plugin panels

Types

80+ type definitions organized by domain:

Editor

BufferId, Position, Range, Selection, TextEdit

Filesystem

FileStat, FileInfo, FileWatchEvent

UI

PanelElement, StatusBarItemOptions, DecorationTypeOptions, GutterProviderOptions, ContextMenuOptions, NotificationOptions

Process and Network

SpawnOptions, HttpRequest, HttpResponse

Configuration

ConfigSchema

Events

DocumentOpenEvent, FormatDocumentEvent, and others

Manifest

PluginManifest, PluginCapabilities, PluginTier

Helper Functions

Edit construction:

insertEdit(position, text)
replaceEdit(range, text)
deleteEdit(range)

Position/range construction:

pos(line, character)
range(startLine, startChar, endLine, endChar)

Manifest utilities:

deriveTier(manifest)        // Determines plugin tier from capabilities
validateManifest(manifest)  // Validates manifest structure
parsePluginManifest(json)   // Parses raw JSON into typed manifest

Testing Utilities

  • MockHost — mock implementation of HoneHost for unit testing plugins
  • createTestBuffer — creates an in-memory buffer for test scenarios

Rust Plugin Host

Loads compiled plugin binaries at runtime. Exposes HoneHostAPI struct that implements the host interface, bridging plugin calls to IDE services.

Marketplace Client

API client for marketplace.hone.codes. Handles plugin search, download, and publish operations.

CLI

Command-line tools for plugin development: scaffolding, building, testing, and publishing plugins.