Skip to content

sdif-format/sdif-lsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDIF LSP

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

Rust Spec v1.0.0 Status: Active


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.


What is sdif-lsp?

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.



Capabilities

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.


Development

Build and run cargo tests:

cargo build                  # compile debug binary
cargo build --release        # compile release binary -> target/release/sdif-lsp
cargo test                   # run test suite


Configuration

Configure 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.



Ecosystem

This GitHub organization hosts the official SDIF ecosystem: the core format, reference tooling, benchmarks, examples, libraries, and editor extensions.

PYTHON CLIENT & CLI

sdif-py

Specification, parser, canonicalizer, and CLI.
The normative reference implementation.

Explore sdif-py →

SPECIFICATION (SSOT)

sdif-spec

Official format specification, canonicalization rules,
and portable conformance test suite.

View specification →

BENCHMARKS

sdif-benchmarks

Reproducible benchmark datasets and reports comparing SDIF with JSON, YAML, XML, and CSV.

View benchmarks →

RUST IMPLEMENTATION

sdif-rs

Pure Rust parser implementation with a span-annotated AST designed for editor tooling.

Explore sdif-rs →

LANGUAGE SERVER (LSP)

sdif-lsp

LSP language server binary (tower-lsp) providing real-time diagnostics and IDE features.

View sdif-lsp →

EDITOR INTEGRATION

vscode-sdif

VS Code extension client providing syntax highlighting, diagnostics, and LSP configuration.

Open extension →

GRAMMAR FOUNDATION

tree-sitter-sdif

Tree-sitter grammar foundation for syntax highlighting and incremental parsing.

Open grammar →

DOCUMENTATION

sdif-format.github.io

Official documentation website containing specification guides, tutorials, and examples.

Read docs →

ORGANIZATION META

.github

Organization profile, assets, and shared community configuration files.

View profile →


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

License

See the sdif-spec repository for license information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages