Editor support
Highlighting and language intelligence both ship with the language, so an editor needs no bespoke client code.
| Want | Use |
| Syntax highlighting | syntaxes/ — a TextMate grammar, scope source.dql |
| Completion, hover, diagnostics | cmd/dql-lsp — a Language Server Protocol server |
| To build your own | lang/ — the same features as plain functions |
The grammar covers the textual pipe syntax. Document-form queries are YAML or JSON, and are highlighted by whatever support the editor already has for those.
source events | where level == "ERROR" | limit 10Install the server01
go install github.com/xraph/dql/cmd/dql-lsp@latestWhat it knows without help02
The server works on a file on disk with nothing else running. That is the baseline, and it is deliberately useful on its own: the grammar, the operator set and the document shape are properties of the language, not of any particular host.
What it knows with help03
A host that knows more, which datasets exist and which functions are registered, passes that in and gets richer completions. Without it, the language itself is still there.
Built on langserver04
dql-lsp is built on langserver, the language-agnostic adapter
that carries JSON-RPC framing, sessions and LSP position mapping. That is why the
server exists at all: the protocol work was already done and is shared with anything
else that needs it.