ubx lsp starts the Language Server Protocol (LSP) server on stdin/stdout. Editors that support LSP can connect to get inline diagnostics, hover documentation, code completion, and go-to-definition for .xcl files.
Usage
Flags
| Flag | Description |
|---|---|
--stdio | Use stdio (default; accepted for LSP client compatibility) |
Features provided
- Inline diagnostics — typecheck errors appear as you type
- Hover documentation — resource type and property descriptions
- Code completion — block types, provider resources, input/locals references
- Go-to-definition — jump to resource, input, or output declarations
- Format on save — via LSP
textDocument/formatting
Important: Do not start from a terminal
The LSP uses JSON-RPC 2.0 over stdin/stdout. Starting it manually from a terminal corrupts the protocol stream. Always let your editor’s LSP client manage the process.Editor setup
VS Code
The ubx VS Code extension manages the LSP automatically. Install from the Marketplace.Neovim (nvim-lspconfig)
Helix
Logging
All LSP server output goes to stderr (never stdout — stdout is the protocol stream). Standardlog output is redirected to stderr automatically.

