OxL Reference

Editor setup

OxL is not tied to one editor. The compiler does all the "smart" work: oxl lsp is a Language Server Protocol server that runs the same front end as oxl check, so the hints and errors in the editor are the errors of the build. Debugging is provided by oxl dap, a Debug Adapter Protocol adapter over lldb-dap. Any editor that can run a command and talk over stdio gets almost what VS Code gets.

EditorHighlightingLSPDebugger (DAP)Page
VS Codeextension (TextMate + semantic tokens)yes, the extensionbuilt-in type oxlVS Code
Neovimtree-sittervim.lsp / nvim-lspconfignvim-dapNeovim
Helixtree-sitterbuilt-in clientbuilt-in clientHelix
Emacs 29+tree-sitter / own modeeglot or lsp-modedape or dap-modeEmacs
Zedtree-sitter (extension)Zed extensionZed debuggerZed
Sublime Text 4.sublime-syntaxLSP packagenoneSublime Text
IntelliJ IDEA, CLion, GoLand…TextMate bundleLSP4IJLSP4IJ (DAP)JetBrains
otherany LSP clientany DAP clientLSP clients

Common to all:

  • the oxl executable must be in PATH (installation) or be given by its full path;
  • files *.oxl; the project root is the directory with oxl.toml (a package is analysed as a whole, with unsaved buffers);
  • the archive provides share/oxl/vscode/*.vsix, share/oxl/tree-sitter-oxl/ and share/oxl/lldb/;
  • the debugger needs lldb-18 (apt install lldb-18), see debugging.

What the server does#

Diagnostics with links to the diagnostic pages, hover (signature, ///, for an rpc the callers, policies and schema version), go to definition and into std, references, rename across package boundaries, document outline, workspace symbols, completion, signature help, formatting (the canonical oxl fmt), quick fixes (handle all errors of a chain, extract a constant, add a policy, generate a mock, move a pipeline step), semantic tokens and inlay hints (inferred types, errors of chain links, effects, the role of a step, markers "in process / over network / scatter-gather"). The full table of requests and the settings are in the LSP guide.

Verified and not verified#

The server is covered by protocol scenarios and a latency test (lsp_scenarios, lsp_latency); the VS Code extension by automatic tests and a manual release checklist. The configurations of the other editors are written from those editors' documentation and from what oxl lsp announces on initialize; they are not part of the automatic checks of the repository. If something does not work, turn on oxl lsp --log (trace to stderr) and report the problem.

OxL 1.0.0-beta · Documentation version 1.0.0-beta© OxwaldLink · generated from the Standard, the std sources and the guides