| Crates.io | oak-navigation |
| lib.rs | oak-navigation |
| version | 0.0.1 |
| created_at | 2026-01-23 02:50:21.742183+00 |
| updated_at | 2026-01-23 02:50:21.742183+00 |
| description | Symbol navigation, definition lookup, and reference tracking for the Oak framework. |
| homepage | |
| repository | https://github.com/ygg-lang/oaks |
| max_upload_size | |
| id | 2063246 |
| size | 30,194 |
Core navigation traits and structures for the Oak ecosystem, providing "Go to Definition" and "Find References" capabilities.
Oak Navigation defines the standard interfaces for navigating through source code. It provides the abstractions needed for cross-referencing symbols across files and projects, supporting the primary navigation features expected in modern IDEs.
DefinitionProvider and ReferencesProvider for consistent implementation across languages.textDocument/definition and textDocument/references.Location and Position types for precise navigation.Language trait.Basic implementation of a definition provider:
use oak_navigation::{DefinitionProvider, Location, Position};
use oak_core::tree::RedNode;
use my_language::MyLanguage;
struct MyNavProvider;
impl DefinitionProvider<MyLanguage> for MyNavProvider {
fn definition(&self, root: &RedNode<MyLanguage::ElementType>, position: Position) -> Vec<Location> {
// Resolve symbol at position and return its definition location
vec![]
}
}
use oak_navigation::{ReferencesProvider, Location, Position};
use oak_core::tree::RedNode;
impl ReferencesProvider<MyLanguage> for MyNavProvider {
fn references(
&self,
root: &RedNode<MyLanguage::ElementType>,
position: Position,
include_declaration: bool
) -> Vec<Location> {
// Search for all usages of the symbol at the given position
vec![]
}
}
Oak Navigation is a key part of:
Contributions are welcome! Please feel free to submit issues or pull requests.
Oak Navigation - Seamless code navigation for every language 🚀