Skip to content

Features: document links, outline, folding ranges, workspace symbols (4/4) - #44

Merged
ajuvercr merged 2 commits into
mainfrom
claude/cheap-features
Nov 18, 2026
Merged

ajuvercr merged 2 commits into
mainfrom
claude/cheap-features

Conversation

@ajuvercr

@ajuvercr ajuvercr commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Last of four stacked PRs, based on #43 (← #42 ← #41). This PR's diff only shows its own commit.

These are read-only views of what the server already parses, in a new core::navigation module.

  • textDocument/documentLink:
    • each owl:imports IRI links to the imported document;
    • each @prefix IRI links to the ontology loaded for it: the cached file, a configured ontology, or else the namespace itself.
  • textDocument/documentSymbol: one symbol per subject block, with its types as detail and its predicates as children. The kind follows the types: shapes, classes, properties, ontologies, other resources.
  • textDocument/foldingRange: multi-line subject blocks, multi-line [ … ] blank nodes, and the run of prefix declarations (as imports).
  • workspace/symbol: subjects across every known document (open, imported, cached and workspace files from Correctness: workspace index, watched files, saved edits, settings changes (3/4) #43), matched case-insensitively, at most 256.

Each can be disabled: document_link, document_symbol, folding_range, workspace_symbol. Anonymous blank nodes get no symbol of their own; they are part of their parent's block.

Testing

  • New stdio tests (real binary):
    • prefix and import links point to the cached ontology and the imported file;
    • the outline has the right kinds, details and children;
    • folding covers the prefix block, subject blocks and a multi-line blank node;
    • workspace symbols find subjects in an open document and in an indexed workspace file.
  • cargo test --workspace (602 tests), cargo fmt --all --check and cargo clippy --workspace --all-targets -- -D warnings (Rust 1.100) pass.

Read-only views of what the server already parsed (`core::navigation`):

- `textDocument/documentLink`: each `owl:imports` IRI links to the imported
  document, each `@prefix` IRI to the ontology loaded for it (the cached
  file, a configured ontology, or the namespace itself).
- `textDocument/documentSymbol`: one symbol per subject block, with its
  types as detail and its predicates as children. The kind follows the
  types: shapes, classes, properties, ontologies, other resources.
- `textDocument/foldingRange`: multi-line subject blocks, multi-line
  `[ … ]` blank nodes, and the run of prefix declarations (as imports).
- `workspace/symbol`: subjects across every known document (open,
  imported, cached, workspace), matched case-insensitively, at most 256.

Each can be disabled (`document_link`, `document_symbol`, `folding_range`,
`workspace_symbol`). Anonymous blank nodes get no symbol of their own.

Tests over stdio for each.
Base automatically changed from claude/correctness to main November 18, 2026 13:15
@ajuvercr
ajuvercr merged commit 3a2b949 into main Nov 18, 2026
@ajuvercr
ajuvercr deleted the claude/cheap-features branch November 18, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants