SDIF Language Server (LSP)
Language Server Protocol (LSP) implementation for the Semantic Data Interchange Format (SDIF),
built with tower-lsp, sdif-rs, and tree-sitter-sdif.
What is sdif-lsp? · Capabilities · Development · Configuration · Ecosystem
|
Compact
Less repeated structure. Fewer wasted tokens. |
Semantic
Tables, relations, metadata and intent. |
Canonical
Stable output for hashing, signing and comparison. |
Auditable
Designed to be read, reviewed and trusted. |
sdif-lsp is an LSP-compliant language server binary for SDIF files. It compiles down to a single binary that communicates with editors via stdin/stdout transport, providing real-time diagnostics, syntactic checks, and IDE features.
It leverages sdif-rs for semantic AST parsing and diagnostics, and uses tree-sitter-sdif captures to produce tokenized highlighting information.
The server implements the following LSP capabilities:
- Diagnostics — Real-time syntax errors and policy limit violations on change.
- Semantic Tokens — Precision structural syntax highlighting via tree-sitter captures.
- Hover — View descriptions, fields, and structures details.
- Completions — Autocomplete support for fields, directives, and metadata.
Build and run cargo tests:
cargo build # compile debug binary
cargo build --release # compile release binary -> target/release/sdif-lsp
cargo test # run test suiteConfigure your editor to execute the compiled sdif-lsp binary. For example, using Neovim nvim-lspconfig:
vim.lsp.start({
name = "sdif-lsp",
cmd = { "/path/to/sdif-lsp" },
filetypes = { "sdif", "sdif.ai" }
})In VS Code, the vscode-sdif extension acts as the client and automatically launches this binary if it is on your system PATH.
This GitHub organization hosts the official SDIF ecosystem: the core format, reference tooling, benchmarks, examples, libraries, and editor extensions.
|
PYTHON CLIENT & CLI
Specification, parser, canonicalizer, and CLI. |
SPECIFICATION (SSOT)
Official format specification, canonicalization rules, |
BENCHMARKS Reproducible benchmark datasets and reports comparing SDIF with JSON, YAML, XML, and CSV. |
|
RUST IMPLEMENTATION Pure Rust parser implementation with a span-annotated AST designed for editor tooling. |
LANGUAGE SERVER (LSP) LSP language server binary (tower-lsp) providing real-time diagnostics and IDE features. |
EDITOR INTEGRATION VS Code extension client providing syntax highlighting, diagnostics, and LSP configuration. |
|
GRAMMAR FOUNDATION Tree-sitter grammar foundation for syntax highlighting and incremental parsing. |
DOCUMENTATION Official documentation website containing specification guides, tutorials, and examples. |
ORGANIZATION META Organization profile, assets, and shared community configuration files. |
Repository map
| Repository | Purpose |
|---|---|
sdif-py |
Core Python parser, validator, canonicalizer, and CLI |
sdif-spec |
Official format specification and conformance test suite (SSOT) |
sdif-benchmarks |
Benchmark datasets, reports, and comparison tooling |
sdif-rs |
Rust parser crate with span-annotated AST |
sdif-lsp |
LSP language server binary |
tree-sitter-sdif |
Tree-sitter grammar foundation for syntax highlighting |
vscode-sdif |
VS Code extension client for SDIF |
sdif-format.github.io |
Public documentation website (Docusaurus) |
.github |
Organization profile, assets, and shared GitHub community files |
See the sdif-spec repository for license information.
