GoX (VS Code)
February 21, 2026 · View on GitHub
VS Code support for GoX: Tree-sitter–based highlighting/folding and GoX language-server integration for completion, diagnostics, go-to-definition, and refactors across both .gox and .go files.
Beta: This extension is in beta. You may encounter bugs or incomplete behavior, and features/configuration may change between releases. Please share feedback and file issues on GitHub (include your GoX version and minimal repro steps).
Features
-
GoX Language Server (LSP)
- Language features for GoX (
.gox) and Go (.go) via the GoX language server (GoX proxiesgopls).
- Language features for GoX (
-
Syntax highlighting + folding
- Semantic highlighting and folding powered by bundled Tree-sitter WASM grammars.
- Supports GoX and Go, including common embedded languages (HTML/CSS/JS) when present.
-
Tool management (automatic)
- Downloads the GoX language server binary (unless you provide a custom path).
- Installs
goplsat the pinned version usinggo install(unless you provide a custom path).
Requirements
- For automatic
goplsinstallation: Go toolchain (go) available in PATH. - For automatic GoX download: Windows/macOS/Linux on x64 or arm64.
- Network access is required for the first-time download/install (unless you point to existing binaries).
GoX proxies
goplsfunctionality for both.goand.gox, so VS Code’s Go extension language server must be disabled.
How it works
On activation, the extension:
- Ensures
goxandgoplsare available (downloads/installs if missing). - Prompts to disable the VS Code Go extension language server (if it is enabled).
- Starts the GoX language server for Go and GoX files.
Commands
- GoX: Start (
gox.start)
Starts (or restarts) the GoX language server after performing a health check. Useful after changing settings.
Settings
You can override the managed binaries and use your own installations:
gox.bin.gox
Path to the GoX language server executable.
gox.bin.gopls
Path to the gopls executable.
Example settings.json:
{
"gox.bin.gox": "/absolute/path/to/gox",
"gox.bin.gopls": "gopls"
}
Troubleshooting
-
Prompt says the Go extension language server must be disabled
- GoX provides Go and GoX language features by running
goplsinternally, so the Go extension’s language server must be off. - If you clicked “Cancel”, set
"go.useLanguageServer": falsein your user settings and run GoX: Start.
- GoX provides Go and GoX language features by running
-
goplsinstallation fails- Install Go and ensure
gois available in PATH, or set"gox.bin.gopls"to an existinggoplsbinary.
- Install Go and ensure
-
Unsupported platform/arch
- Automatic GoX download supports Windows/macOS/Linux on x64/arm64 only.
- Install
goxmanually and set"gox.bin.gox".
Related projects
- GoX language server and library: https://github.com/doors-dev/gox
- Tree-sitter grammar: https://github.com/doors-dev/tree-sitter-gox