Language support (LSP)
Real language servers power hover docs, go-to-definition, and live diagnostics.
Mel can run a real language server for your repo and wire its intelligence into both the diff view and the built-in editor: hover documentation, go-to-definition, and diagnostics that update while you type. No plugins — it's the same LSP servers your IDE uses, spoken to over stdio.
Enabling it
Language support is per-repo and opt-in. When you open the code review panel in a repo without a server running, a footer banner appears:
Language support is not currently enabled for
<repo>— Enable<tool>
Click Enable and Mel starts the right server for your project, detected from repo markers:
| Project | Server |
|---|---|
Rust (Cargo.toml) | rust-analyzer |
| TypeScript / JavaScript | typescript-language-server |
| Python | pyright |
| C / C++ | clangd |
The server binary must be installed on your machine — Mel launches it, it doesn't download it. While a server is running, a green ● <server> indicator shows in the review panel header.
Hover documentation
Rest your pointer on an identifier (about a 300 ms dwell) in a diff or in the editor and Mel sends a hover request — the tooltip shows the real signature and docs for that symbol.
If the server returns nothing, or no server is installed at all, Mel falls back to a background git grep lookup that finds the symbol's doc comment in your repo. You get useful hovers either way; the LSP just makes them precise.
Go to definition
ctrl+click (cmd on macOS) an identifier to jump to its definition in the built-in editor, opened at the exact line. This works for targets outside your repo too — for example, jumping into the Rust standard library sources from a std:: call.
The same hover and jump machinery is shared by the diff view and the editor, so intelligence behaves identically in both.
Live diagnostics
With a server running, the editor syncs your buffer on a short debounce (about 250 ms) as you type, and the server's diagnostics drive the editor footer live — you see ✗ N errors appear and disappear while typing, before you ever save.
Without a server, Rust files still get checked: saving with ctrl+S runs cargo check and surfaces the errors in the footer.
Summary of fallbacks
| Capability | With LSP | Without LSP |
|---|---|---|
| Hover docs | Real signature + docs | git grep doc-comment lookup |
| Go to definition | Yes, incl. out-of-repo | Not available |
| Diagnostics | Live while typing | Rust only, cargo check on save |