Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Xeto IDE ExtensionNew to Visual Studio Code? Get it now.
Xeto IDE Extension

Xeto IDE Extension

Xeto

|
88 installs
| (0) | Free
Language support for Xeto - provides syntax highlighting, auto-complete, and code navigation for .xeto files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

XETO Extension for VSCode

GitHub CI License

Overview

The XETO Extension for VSCode provides language support and code editing features for the XETO language using the Language Server Protocol (LSP).

Key Features

  • Syntax highlighting - with semantic token support, including embedded language highlighting inside heredocs (<axon:--->, <js:--->, <py:--->)
  • Code completion - type-aware suggestions: inherited slots, enum values, choice subtypes, query constraints, and meta tags — with smart indentation inside { } blocks
  • Go to definition - across local files and external libraries
  • Hover information - inline documentation on hover
  • Diagnostics - syntax errors and unresolved dependency warnings
  • Props-based resolution - automatic library discovery via fan.props / xeto.props
  • Context switching - reloads libraries when switching between repos
  • Build current lib - status bar button to run fan xeto build for the active lib
  • Rename symbols - across the entire workspace
  • Formatting - automatic code formatting

Environments

The extension works in both:

  • Desktop environment - Full-featured VS Code
  • Web environment - Compatible with vscode.dev and github.dev

Library Resolution

The extension discovers Xeto libraries using the same conventions as the Fantom/Xeto CLI tools. For most projects, no configuration is needed.

Props-Based Path Resolution

When you open a .xeto file, the extension walks up the directory tree looking for xeto.props or fan.props. If found, it parses the path= line and scans the resolved directories for libraries.

# fan.props
path=../studio;../haxall;../xeto

Paths are semicolon-separated and resolved relative to the props file directory. Each resolved directory is scanned for src/xeto/ (raw source) and lib/xeto/ (compiled xetolibs).

This is the same resolution mechanism used by xetoc and the Haxall runtime.

What Works Out of the Box

Just install and open a .xeto file. The bundled standard libraries (sys, ph, ph.equips, ph.points, ashrae.g36, etc.) are always available. If your project has a fan.props with a path= line, all referenced repos are resolved automatically.

Priority

When the same library exists at multiple levels, the highest-priority source wins:

Priority Source Description
1000+ Source .xeto files Raw source in src/xeto/ directories
10+ Compiled .xetolib files Compiled libraries in lib/xeto/ directories
1-N External libraries Configured via xeto.libraries.external setting
-1 Bundled standard libs sys, ph, ph.equips, etc.

Status Bar

The status bar shows the current resolution state:

  • Xeto: fan.props (5 paths) - resolved via fan.props
  • Xeto: xeto.props (3 paths) - resolved via xeto.props
  • Xeto: bundled only - no props file found

Click it to see the full resolved path in the Output channel.

Build Current Lib

A second status bar button — $(tools) Build: <libName> — appears whenever the active file belongs to a Xeto lib (a directory containing a lib.xeto). Clicking it runs fan xeto build <libName> in a reusable Xeto Build terminal.

Because a lib can be buildable from more than one props context (its own repo, or another repo whose path= includes it — e.g. building a cc.* lib through studio's fan.props), the button resolves the build context as follows:

  • One valid context → builds immediately.
  • Multiple contexts → a quick pick lets you choose which workDir to build from. Your choice is remembered as the per-lib default, so subsequent clicks build without prompting. The chosen context shows in the button label: Build: <libName> (studio).

To clear a remembered choice, run Xeto: Reset Build Context for Current Lib from the command palette.

Dependency Diagnostics

In lib.xeto files, each entry in the depends block is checked against the resolved path. If a referenced library isn't found, a warning appears on the lib name.

Live Props Watching

When you edit a fan.props or xeto.props file, the extension automatically invalidates its cache and re-resolves. No VS Code reload needed.

External Libraries (Fallback)

For projects without a props file, you can configure library paths manually in .vscode/settings.json:

macOS / Linux:

{
  "xeto.libraries.external": [
    "/path/to/haxall/lib/xeto",
    "/path/to/other-repo/src/xeto"
  ]
}

Windows:

{
  "xeto.libraries.external": [
    "C:\\Code\\haxall\\lib\\xeto",
    "C:\\Code\\other-repo\\src\\xeto"
  ]
}

Each path is scanned for subdirectories containing a lib.xeto file (raw source) or a .xetolib file (compiled library).

Features

Syntax highlighting with semantic token support:

Go to definition across local files and external libraries:

Code completion with type-aware suggestions:

See the full feature gallery with demos in FEATURES.md.

How to Use

Open any .xeto file and the extension activates automatically.

Completions

Completions trigger automatically as you type, or press Ctrl+Space (⌃+Space on Mac) to invoke them manually.

Context What you get
Inside a typed { } dict Slots of the enclosing type (including inherited)
After slotName: on a value Enum values, choice subtypes, or fitting types
Inside a Query dict (e.g. points { }) Subtypes of the query's of constraint
After name: on a spec declaration All visible type names
Inside a < > meta block Applicable meta tags
After @ Data instance refs

Navigation

  • Go to Definition — Ctrl+Click or F12 on any type or slot name
  • Peek Definition — Alt+F12
  • Hover — hover over any symbol for inline documentation

Editing

  • Rename Symbol — F2 on a symbol to rename across the workspace
  • Format Document — Shift+Alt+F

Building

Click the Build: <libName> button in the status bar to run fan xeto build for the current lib.

Installation

Extension Marketplace

  1. Launch Visual Studio Code
  2. Open the Extensions tab using Ctrl+Shift+X or ⌘+Shift+X
  3. Search by using xeto
  4. Install the extension

GitHub Release

  1. Go to the "Releases" section
  2. Download the latest release package under extension.vsix
  3. Launch Visual Studio Code
  4. Open the Extensions tab using Ctrl+Shift+X or ⌘+Shift+X
  5. Select Install from VSIX... from the Views and More Actions menu
  6. Navigate to the downloaded file and select it

Note: For detailed instructions on installing from VSIX, see the official VS Code documentation.

Contributing

We welcome bug reports, feature requests, and feedback! Please see CONTRIBUTING.md for guidelines.

License

This project is licensed under the BSD-3-Clause License. See the LICENSE for more info.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft