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

Editor Support

Shadowtree includes a shared JSON Schema for Shadowtree TOML config files plus editor integration files for Zed and VS Code under editors/.

The Zed extension provides a dedicated Shadowtree TOML language, syntax highlighting, Shadowtree-specific highlighting, shell semantic highlighting for script-valued fields, and LSP completion, diagnostics, and semantic tokens. The bundled Zed language association covers .shadowtree.toml; TOML files under .shadowtree/ need the user file_types setting below.

The VS Code extension binds the shared schema to Shadowtree TOML files through Even Better TOML. Completion, hover, and validation come from that extension.

Install the Zed language server with:

go install github.com/yusing/shadowtree/cmd/shadowtree-lsp@latest

See the full spec, the Zed extension README, and the VS Code extension README for implementation details.

VS Code Config

"files.associations": {
  ".shadowtree.toml": "toml",
  "**/.shadowtree.toml": "toml",
  "*.shadowtree.toml": "toml",
  "**/*.shadowtree.toml": "toml",
  ".shadowtree/*.toml": "toml",
  "**/.shadowtree/*.toml": "toml"
},
"evenBetterToml.schema.associations": {
  "^file://.*/[^/]*\\.shadowtree\\.toml$": "https://raw.githubusercontent.com/yusing/shadowtree/main/schemas/shadowtree.schema.json",
  "^file://.*/\\.shadowtree/.*\\.toml$": "https://raw.githubusercontent.com/yusing/shadowtree/main/schemas/shadowtree.schema.json"
}

Zed Config

Use this when Zed classifies a Shadowtree config as plain TOML, or when you keep Shadowtree config fragments under .shadowtree/*.toml.

"file_types": {
  "Shadowtree TOML": [
    ".shadowtree.toml",
    "**/.shadowtree.toml",
    "*.shadowtree.toml",
    "**/*.shadowtree.toml",
    ".shadowtree/*.toml",
    "**/.shadowtree/*.toml"
  ]
},
"languages": {
  "TOML": {
    "language_servers": ["shadowtree-lsp", "..."]
  }
}