| Crates.io | oak-symbols |
| lib.rs | oak-symbols |
| version | 0.0.1 |
| created_at | 2026-01-23 04:03:52.588445+00 |
| updated_at | 2026-01-23 04:03:52.588445+00 |
| description | Symbol extraction and management for the Oak framework. |
| homepage | |
| repository | https://github.com/ygg-lang/oaks |
| max_upload_size | |
| id | 2063364 |
| size | 33,235 |
Universal symbol indexing and search engine for the Oak ecosystem.
Oak Symbols provides a unified way to identify, collect, and search for symbols (functions, classes, variables, etc.) across source files. It features a UniversalSymbolProvider that can automatically extract symbols from any language that follows Oak's semantic role conventions.
workspace/symbol and textDocument/documentSymbol.UniversalElementRole for consistent symbol categorization across different languages.Using the UniversalSymbolProvider:
use oak_symbols::{UniversalSymbolProvider, SymbolProvider};
use oak_core::tree::RedNode;
use my_language::MyLanguage;
let provider = UniversalSymbolProvider::new();
// let symbols = provider.document_symbols::<MyLanguage>(&root);
use oak_symbols::SymbolInformation;
use oak_core::language::UniversalElementRole;
use oak_lsp::Location;
let info = SymbolInformation {
name: "calculate_total".to_string(),
role: UniversalElementRole::Definition,
location: Location { uri: "...".to_string(), range: 10..30 },
container_name: Some("OrderProcessor".to_string()),
};
The UniversalSymbolProvider works by inspecting the UniversalElementRole of AST nodes. Any node marked as Definition is automatically indexed as a symbol, and its children are searched for identifiers to use as the symbol name.
Contributions are welcome! Please feel free to submit issues or pull requests.
Oak Symbols - Finding the needle in the code haystack 🚀