Skip to content

Build on vscode-jsonld

Excluded alternative universe

This is the excluded alternative universe from the parent ADR.

This planning path assumes that vscode-jsonld becomes an installable LSP foundation. It is currently unavailable through the VS Code Marketplace; this page records the work that would become necessary if publication made that foundation usable.

alexkreidler/vscode-jsonld declares repository version 1.0.0 package.json, but its expected VS Code Marketplace item is absent.

Implementation checklist

  • Publish a release and an installable extension or standalone server package before depending on this code as an LSP foundation.
  • Audit the VS Code extension and language-server boundary; extract a generic server interface that does not require the VS Code extension host.
  • Implement YAML-LD parsing with a source map from JSON-LD value paths to authored YAML key and scalar spans.
  • Extract Markdown-LD front matter, preserve its document offsets, and map diagnostics and navigation ranges back to the Markdown buffer.
  • Define JSON-LD context loading, local-document access, and relative-IRI base-resolution policies before connecting semantic processing to workspace files.
  • Interpret @type: @id coercion to distinguish IRI-valued strings from literals; emit clickable document links and all matching workspace definitions.
  • Make in-memory, unsaved buffers authoritative for parsing, context resolution, indexing, links, and navigation.
  • Test the extracted generic server with at least one non-VS Code LSP client, including diagnostics, links, multiple definitions, relative IRIs, and unsaved edits.
  • Distribute the generic server independently, document editor configuration and file associations, and keep the extension package aligned with it.

Consequences

  • Maintain a fork or upstream a generic server boundary if the extension’s architecture cannot be reused without VS Code assumptions.
  • Own the YAML-LD and Markdown-LD parsers, source mappings, workspace index, and their regression suites.
  • Operate and support a publication channel that does not exist for this project today.
  • Track compatibility between the generic server, the VS Code extension, and other LSP clients as separate release surfaces.