OntoCore LSP¶
OntoCore LSP is currently provided by the ontocore-lsp binary and crate. The VS Code extension bundles this server and communicates over stdio.
Binary¶
| Platform artifact | Name |
|---|---|
| Language server | ontocore-lsp |
| Bundled path (extension) | extension/server/<platform>-<arch>/ontocore-lsp |
The binary has been named ontocore-lsp since the v0.9 OntoCore identity rename. Wire format may change until v1.0 — see LSP API reference.
Custom methods¶
OntoCore exposes workspace operations via ontocore/* LSP methods:
| Method | Purpose |
|---|---|
ontocore/indexWorkspace |
Index workspace folder |
ontocore/getCatalogSnapshot |
Explorer tree data |
ontocore/getEntity |
Entity inspector payload |
ontocore/getGraph |
Graph visualization data |
ontocore/query / ontocore/sparql |
Query workbench |
ontocore/applyAxiomPatch |
Turtle and OBO write-back (format dispatch by extension) |
ontocore/parseManchester |
Manchester editor |
ontocore/runReasoner / ontocore/getExplanation |
Reasoning |
ontocore/findUsages / ontocore/previewRefactor / ontocore/applyRefactor |
Refactoring |
ontocore/semanticDiff |
Semantic diff between git refs or directories |
Full wire format: LSP API reference.
Rust library¶
use ontocore::lsp::catalog_snapshot_json;
use ontocore::catalog::IndexBuilder;
let catalog = IndexBuilder::new().workspace("fixtures").build()?;
let json = catalog_snapshot_json(&catalog)?;
Protocol types: ontocore::lsp::protocol.
Diagnostics¶
LSP publishes diagnostics with source: "ontocore". This identifier is unchanged in v0.9 for compatibility.