Skip to main content

Crate onoma

Crate onoma 

Source
Expand description

§Onoma

ὄνομαOnoma (pronounced OH-no-ma) is Greek for “name”, signifying not just a label, but the essence or character of a thing.

Onoma is a fast, language-agnostic semantic symbol indexer and fuzzy finder, which supports real-time cross-language symbol matching, without needing a full language server and without applying limits to workspace-wide queries.

It achieves this through incremental indexing with Tree-sitter and filesystem events, and includes typo-resistant fuzzy matching with a scoring system to prioritise relevant results.

While Onoma can be used as a standalone crate, its primary goal is to act as an editor-agnostic indexer and resolver which can be cross-compiled and integrated into text editors and IDEs.

§Supported Languages

  • Rust (.rs)
  • Go (.go)
  • Lua (.lua)
  • Clojure (.clj)
  • TypeScript (.ts and .tsx) / JavaScript (.js and .jsx)
  • Python (.py)

§Usage

§1. Editor Integrations

Feel free to open an issue with ideas for additional editor integrations.

onoma.nvim

Currently, Onoma is integrated with:

  1. Neovim, using onoma.nvim with Snacks Picker

§2. Standalone Crate

[dependencies]
onoma = "0.0.11"
§Documentation

Full documentation is available on docs.rs.

§Contributing

Contributions are welcome!

The core Onoma backend should contain all editor-agnostic functionality, including improvements to indexing and fuzzy matching.

For editor-specific features or changes to bindings for a particular editor, please submit pull requests in the respective editor repositories listed above.

§Testing

The tests can be run with:

cargo test

§Acknowledgments

  • fff.nvim for inspiring the semantic fuzzy finder design in Onoma.
  • snacks.nvim for the excellent picker frontend.
  • frizbee for the high-performance SIMD implementation of fuzzy matching.

Modules§

indexer
Low-level tooling for managing in-memory indexes using a persistent database.
models
A set of in-memory, and language-agnostic, data models which govern the full end-to-end flow of a symbol.
parser
Low-level tooling for reading source code files and parsing symbols into in-memory models.
resolver
Tooling for fuzzy matching and scoring symbols from indexes in real-time.
watcher
Incremental indexing using crate::indexer::Indexer and filesystem events.