Build on mskvarc/jsonld
Excluded alternative universe
This is the excluded alternative universe from the parent ADR.
This planning path uses mskvarc/jsonld as the JSON-LD semantic foundation, not as an existing LSP. “Universe” is planning shorthand for the consequences of committing to this foundation.
mskvarc/jsonld is published as the jsonld crate.
Implementation checklist
- Select or create the LSP transport and document store, including URI, position-conversion, lifecycle, capability-registration, and workspace-index boundaries.
- Parse JSON-LD, YAML-LD, and Markdown-LD into source-mapped semantic values that retain authored key and scalar spans.
- Bridge
jsonldsemantic processing and errors to original source paths; do not report diagnostics against a serialized intermediate JSON document. - Define the context and local-IRI loader policy, including relative resolution, allowed local documents, remote-context handling, and contextual base IRI selection.
- Interpret JSON-LD
@type: @idcoercion to classify IRI-valued values, expose clickable links, and maintain a workspace index that returns every definition for an IRI. - Make unsaved buffers and incremental edits authoritative for parsing, context resolution, diagnostics, document links, and the definition index.
- Translate
jsonldprocessing errors into diagnostics at the original JSON-LD, YAML-LD, or Markdown-LD source spans. - Add protocol and end-to-end LSP tests covering diagnostic ranges, context errors,
@type: @idlinks, relative cross-file resolution, multiple definition targets, and unsaved edits. - Publish a Rust binary and editor-installation path, including file associations for JSON-LD, YAML-LD, and Markdown-LD.
Universe consequences
- The project must supply the complete LSP transport, workspace model, syntax parsing, source mapping, navigation, and editor-distribution layers around
jsonld. - YAML-LD and Markdown-LD require a maintained semantic-value-to-source-span bridge because
jsonldreceives JSON-LD values rather than their original YAML or Markdown syntax. - The published
jsonldcrate becomes a direct compatibility and release-management dependency for the language server.