Repository navigation
Features: document links, outline, folding ranges, workspace symbols (4/4) - #44
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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::navigationmodule.textDocument/documentLink:owl:importsIRI links to the imported document;@prefixIRI 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
cargo test --workspace(602 tests),cargo fmt --all --checkandcargo clippy --workspace --all-targets -- -D warnings(Rust 1.100) pass.