This repository contains the SurrealQL language tooling stack in one place:
crates/language-server: genericstdioLSP server for SurrealQLextensions/zed-surrealql: Zed extension and bundled grammar assets- sibling checkout at
../tree-sitter-surrealql: canonical tree-sitter grammar source
The grammar stays in the monorepo even with the LSP in place:
Zeduses tree-sitter directly for syntax highlighting, structure, and editor-native UX.Neovimcan pair the same LSP withnvim-treesitterfor highlighting, folds, and textobjects.VSCodeuses the same LSP overstdio; the server still parses SurrealQL with the sibling tree-sitter grammar checkout.
The language server now includes a semantic layer for:
- permission-aware diagnostics and hover
- function indexing, references, rename, signature help, and call hierarchy
- schema inference from DDL and query flow
- merged local, remote, and inferred metadata
- contextual
record<table>completion
The Zed extension now launches the same monorepo surreal-language-server binary. It resolves the command from:
lsp.surreal-language-server.binary.pathif configured in Zedtarget/release/surreal-language-serverin this repo when the monorepo itself is the opened worktreetarget/debug/surreal-language-serversurreal-language-serverfromPATH
.
├── crates/
│ └── language-server/
├── extensions/
│ └── zed-surrealql/
Rust workspace:
cargo testTree-sitter grammar:
cd ../tree-sitter-surrealql
bun install --frozen-lockfile
bun run checkThe language server now consumes the sibling ../tree-sitter-surrealql checkout by default. Set TREE_SITTER_SURREALQL_DIR if your grammar lives elsewhere.
To refresh the Zed extension's vendored grammar after package changes:
bash scripts/sync-zed-grammar.shGitHub Actions runs Rust formatting/tests and Zed extension asset/build checks in this repo. Grammar tests now live in the standalone ../tree-sitter-surrealql repo.