Build on Turtle Language Server
Excluded alternative universe
This is the excluded alternative universe from the parent ADR.
This planning path builds the server on Turtle Language Server. “Universe” is planning shorthand for the consequences of committing to this foundation.
BrickSchema/langserver is a Python language server for Turtle, published as turtle-language-server.
Implementation checklist
- Evaluate the reusable
pyglslifecycle and document synchronizationserver.py, separating protocol plumbing from Turtle-specific behaviour. - Generalize Turtle and RDFLib-backed language behaviour
BrickSchema/langserverinto JSON-LD-aware analysis without regressing Turtle documents. - Implement a YAML AST adapter that retains authored key and scalar spans while producing JSON-LD values.
- Extract Markdown front matter and map every embedded YAML range back through its containing Markdown offset.
- Select a JSON-LD 1.1 processor and context model and implement a safe relative-IRI resolver shared by all three document formats.
- Interpret
@type: @idcoercion to classify IRI values, expose clickable document links, and return every target through Go to Definition. - Make the derived graph, ranges, links, and definition index follow the authoritative in-memory open and change notifications before workspace files on disk.
- Add pytest-based fixtures
BrickSchema/langserverand end-to-end LSP tests for diagnostic ranges, Markdown offsets, relative IRIs, multiple definitions, links, and unsaved edits. - Publish a Python package and validate editor deployment through the
turtle-language-serverinstallation channel.
Universe consequences
- Maintain a Python and
pyglsruntime, including its LSP lifecycle and editor-distribution compatibility. - Own a new JSON-LD semantic layer and its context-loading, IRI-resolution, and source-map policies beside the original Turtle/RDFLib implementation.
- Maintain YAML-LD and Markdown-LD parsers, mappings, and incremental-edit tests that the Turtle server does not provide.
- Separate generic server packaging and documentation from the Brick-specific identity of the existing published package.