V1 Built-in Extensions
Built-in extensions use hone-extension.json manifests and ship with the IDE binary. They are loaded by the ExtensionRegistry in hone-core.
Manifest Structure
Each extension lives in its own directory under extensions/<lang>/ and is defined by a hone-extension.json file:
{
"id": "hone.typescript",
"name": "TypeScript",
"version": "1.0.0",
"publisher": "hone",
"description": "TypeScript and JavaScript language support",
"license": "MIT",
"engines": { "hone": ">=1.0.0" },
"main": "src/index.ts",
"activationEvents": [
"onLanguage:typescript",
"onLanguage:javascript",
"onLanguage:typescriptreact",
"onLanguage:javascriptreact"
],
"contributes": {
"languages": [
{
"id": "typescript",
"aliases": ["TypeScript", "ts"],
"extensions": [".ts", ".mts", ".cts"],
"configuration": "./language-configuration.json"
}
],
"lspServers": [
{
"id": "typescript-language-server",
"command": "typescript-language-server",
"args": ["--stdio"],
"languages": ["typescript", "javascript", "typescriptreact", "javascriptreact"]
}
],
"commands": [],
"snippets": [],
"configuration": {},
"keybindings": []
}
}
Manifest Fields
| Field | Required | Description |
|---|---|---|
id | Yes | Unique identifier (convention: hone.<language>) |
name | Yes | Display name |
version | Yes | Semver version string |
publisher | Yes | Publisher identifier |
description | Yes | Short description |
license | Yes | SPDX license identifier |
engines.hone | Yes | Minimum compatible Hone version |
main | No | Entry point file (if extension has runtime code) |
activationEvents | Yes | Events that trigger extension loading |
Contribution Points
The contributes object declares what the extension provides:
- languages – Language definitions with file extensions, aliases, and configuration
- lspServers – LSP server configurations (command, args, supported languages)
- commands – Commands registered in the command palette
- snippets – Code snippets for the language
- configuration – Settings the extension exposes
- keybindings – Default keyboard shortcuts
Walkthrough: Adding a New Language
- Create a directory:
extensions/<lang>/ - Create
hone-extension.jsonwith the language metadata - Define language contributions: file extensions, aliases, language configuration
- Configure an LSP server if one exists (specify the command, args, and supported language IDs)
- Add commands, snippets, and keybindings as needed
- Register the extension in the extension system
Language Configuration
The language-configuration.json file controls editor behavior for the language:
{
"comments": {
"lineComment": "//",
"blockComment": ["/*", "*/"]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "\"", "close": "\"" },
{ "open": "'", "close": "'" }
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
]
}
Existing Built-in Extensions
| Extension | Languages | LSP Server |
|---|---|---|
| TypeScript | TypeScript, JavaScript, TSX, JSX | typescript-language-server |
| Python | Python | pylsp or pyright |
| Rust | Rust | rust-analyzer |
| Go | Go | gopls |
| C++ | C, C++, Objective-C | clangd |
| HTML/CSS | HTML, CSS, SCSS, Less | vscode-html-languageserver |
| JSON | JSON, JSONC | vscode-json-languageserver |
| Markdown | Markdown | – |
| Docker | Dockerfile, Docker Compose | – |
| TOML/YAML | TOML, YAML | – |
| Git | Git commit, Git rebase, .gitignore | – |