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.
| Editor | Highlighting | LSP | Debugger (DAP) | Page |
|---|---|---|---|---|
| VS Code | extension (TextMate + semantic tokens) | yes, the extension | built-in type oxl | VS Code |
| Neovim | tree-sitter | vim.lsp / nvim-lspconfig | nvim-dap | Neovim |
| Helix | tree-sitter | built-in client | built-in client | Helix |
| Emacs 29+ | tree-sitter / own mode | eglot or lsp-mode | dape or dap-mode | Emacs |
| Zed | tree-sitter (extension) | Zed extension | Zed debugger | Zed |
| Sublime Text 4 | .sublime-syntax | LSP package | none | Sublime Text |
| IntelliJ IDEA, CLion, GoLand… | TextMate bundle | LSP4IJ | LSP4IJ (DAP) | JetBrains |
| other | any LSP client | any DAP client | LSP clients |
Common to all:
- the
oxlexecutable must be inPATH(installation) or be given by its full path; - files
*.oxl; the project root is the directory withoxl.toml(a package is analysed as a whole, with unsaved buffers); - the archive provides
share/oxl/vscode/*.vsix,share/oxl/tree-sitter-oxl/andshare/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.