OxL Reference

Any LSP client

The server is oxl lsp (the flag --stdio is accepted and ignored: there is one transport, JSON-RPC 2.0 with Content-Length over stdin/stdout). Client parameters:

ParameterValue
Commandoxl lsp
Language, extensionoxl, *.oxl
Rootthe directory with oxl.toml (otherwise the file is analysed on its own)
Synchronizationincremental (textDocumentSync.change = 2), UTF-8 with normalized line ends
Position encodingUTF-16 by default; if the client offers utf-8 in general.positionEncodings, that is chosen
Completion triggers. and :; signature help: ( and ,
File watchingthe client sends workspace/didChangeWatchedFiles; the server re-reads files changed on disk

Options (initializationOptions or workspace/didChangeConfiguration → settings.oxl):

json
{
  "debounceMs": 150,
  "diagnosticDocsBase": "https://docs.example.org/ru/diagnostics/",
  "inlayHints": { "types": true, "chainErrors": true, "effects": true, "pipelineRoles": true, "callMarkers": true }
}

Environment variables: OXL_STD_DIR (sources of the standard library), OXL_DIAG_DOCS (base of the diagnostic links), OXL_LSP_LOG=1 (trace of requests and timings to stderr; the same as oxl lsp --log).

Capabilities the server announces#

hover, definition, typeDefinition, references, documentHighlight, rename (with prepareRename), documentSymbol, workspaceSymbol, completion, signatureHelp, formatting / rangeFormatting / onTypeFormatting, codeAction, semanticTokens (full and range), inlayHint, and diagnostics with a code, codeDescription.href (the link to the diagnostic page), relatedInformation, Unnecessary/Deprecated tags and fixes in data.

A manual check#

sh
printf 'Content-Length: 58\r\n\r\n{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | oxl lsp --log

The answer to initialize contains serverInfo (oxl-lsp) and the capabilities above. If a client "hangs" at start, the usual problem is the PATH of the editor: start it from a terminal or give oxl by its full path.

Highlighting without the server#

For tree-sitter editors, the grammar share/oxl/tree-sitter-oxl (page); for TextMate editors, syntaxes/oxl.tmLanguage.json from the unpacked .vsix. The grammar check script: python3 tools/tree-sitter-oxl/scripts/check.py -v.

The debugger#

oxl dap is a DAP adapter over stdio (debugging): the client starts the command and holds the usual dialogue initialize → launch → setBreakpoints → configurationDone.

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