kakehashi is a Tree-sitter-based language server that bridges the gap between languages, editors, and tooling.
flowchart TB
K[kakehashi] <-->|Syntax Highlight<br>Selection Range<br>Go-to Definition<br>...| E["Editor<br>(Any LSP Client)"]
K[kakehashi] <-.->|Optional bridging<br>for embedded<br>languages| LS["External<br>Language Servers"]
kakehashiοΌζΆγζ©οΌmeans "bridge" in Japanese β and that's exactly what this language server does:
Tree-sitter grammars work everywhere. By leveraging Tree-sitter for parsing, kakehashi provides consistent syntax highlighting, selection ranges, and more across any editor that supports LSP and any language with a Tree-sitter grammar.
No more fragmented tooling per editor or language.
Markdown with code blocks? HTML with inline JavaScript? kakehashi detects these injection regions and can:
- Provide Tree-sitter features directly β semantic tokens and selection ranges work inside embedded code
- Delegate to external language servers β go-to-definition, hover, completion, etc. are forwarded to the appropriate language server (e.g., rust-analyzer for Rust code blocks)
This "virtual file" bridging lets you get full IDE features even inside embedded code.
| Feature | Host | Injection | Bridge |
|---|---|---|---|
| Semantic Tokens | β | β | β |
| Selection Range | β | β | β |
| Go-to Definition | β | β | β |
| Go-to Type Definition | β | β | β |
| Go-to Implementation | β | β | β |
| Go-to Declaration | β | β | β |
| Hover | β | β | β |
| Completion | β | β | β |
| Signature Help | β | β | β |
| Find References | β | β | β |
- Host: Features for the main document language
- Injection: Features for embedded language regions
- Bridge: Features delegated to external language servers
Download the latest release for your platform from GitHub Releases.
Prepare the following, and kakehashi will auto-install Tree-sitter parsers and queries as needed:
- C compiler
- Git (optional β only needed for non-GitHub parser repositories)
See docs/README.md for detailed setup instructions for various editors.
make deps/nvim
nvim -u scripts/minimal_init.luaTraditional language servers are language-specific. Tree-sitter parsers are fast and universal, but historically lacked the "smart" features. kakehashi bridges both worlds:
- Universal parsing via Tree-sitter
- Smart features via LSP bridge to specialized language servers
- Editor-agnostic β works with any LSP client
Whether you're editing a Markdown document with embedded Rust, or an HTML file with inline CSS and JavaScript, kakehashi acts as the ζΆγζ© (bridge) that connects everything together.
MIT