anitnilay20 / anitnilay20/thoth
[Future] Tree-sitter: general-purpose code file viewer with syntax highlighting
- 主要言語
- Rust
- スター
- 70
- フォーク
- 5
- 平均マージ
- 10時間 33分
- マージ済み PR(30日)
- 2
説明
## Idea
Use [tree-sitter](https://tree-sitter.github.io/) as the foundation for making Thoth a capable viewer for source code files — not just data files. Tree-sitter provides incremental parsing and syntax highlighting for virtually every language via its grammar ecosystem.
## What this unlocks
Opening non-data files in Thoth today shows raw text. With tree-sitter:
- `schema.sql` → SQL syntax highlighting, keyword colouring, folding
- `config.yaml` / `config.toml` → structure-aware highlighting and folding
- `main.rs`, `app.py`, `index.ts` → full language highlighting
- Any language with a tree-sitter grammar works without additional code
## What this is NOT
Context-aware SQL completion in the query editor (issue #149) does **not** need tree-sitter. That uses `sqlparser-rs` (pure Rust, no C) to parse partial SQL and consult `FileQueryEngine::schema()` for completions — a much lighter approach.
Tree-sitter is the right call only if Thoth expands scope to become a general code file viewer across arbitrary languages. That is a separate product decision.
## Considerations before committing
- Tree-sitter is a C library — adds FFI complexity and cross-compilation burden
- Each language grammar is a separate compiled artifact to bundle
- Binary size impact from bundled grammars
- Decide whether Thoth's scope includes code files or remains data-focused
## Parking here
Not prioritised. Revisit if there is clear user demand for code file viewing beyond what the current plain-text fallback provides.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。