Code navigation
Jump from a name in the diff to its definition, its docs and its references without leaving the review. nittle asks a language server you’ve installed. With none installed, everything else works the same and nothing prints an error.
Install a language server
Section titled “Install a language server”Run nittle lsp to see what each language gets. This is real output from a machine with only gopls installed:
$ nittle lsptypescript not on PATH (tried typescript-language-server) npm install -g typescript-language-server typescriptcsharp not on PATH (tried roslyn-language-server, csharp-ls) dotnet tool install -g roslyn-language-server --prerelease (or: dotnet tool install -g csharp-ls)python not on PATH (tried pyrefly, basedpyright-langserver) pip install pyrefly (or: pip install basedpyright)go /home/me/go/bin/goplsrust not on PATH (tried rust-analyzer) rustup component add rust-analyzervue not on PATH (tried vue-language-server) npm install -g @vue/language-serversvelte not on PATH (tried svelteserver) npm install -g svelte-language-serverRun the install command for the languages you review, then run nittle lsp again to check. gopls comes from go install golang.org/x/tools/gopls@latest.
| language | extensions | servers, first found on PATH wins |
|---|---|---|
| TypeScript / JavaScript | ts, tsx, mts, cts, js, jsx, mjs, cjs | typescript-language-server |
| C# | cs | roslyn-language-server, then csharp-ls |
| Python | py, pyi | pyrefly, then basedpyright-langserver |
| Go | go | gopls |
| Rust | rs | rust-analyzer |
| Vue | vue | vue-language-server |
| Svelte | svelte | svelteserver |
The TypeScript server needs a typescript package it can resolve, in the project’s node_modules or installed globally next to the server. TypeScript 7 (the native port) has no tsserver.js, so use TypeScript 5.x with it.
For Python, an active virtualenv (VIRTUAL_ENV) is searched before PATH, so site-packages resolve.
Pick a different server
Section titled “Pick a different server”nittle lsp set stores a command for one language. Quote it when it has arguments, and pass "" to turn the language off:
nittle lsp set python "basedpyright-langserver --stdio"nittle lsp set rust ""nittle lsp unset pythonOverrides live in ~/.nittle/state.json, and nittle lsp lists them after the table. Commands run directly, not through a shell.
For one run only, pass --lsp. An empty command turns that language off. --no-lsp starts no servers at all. Both work on nittle and nittle show:
nittle --lsp rust=rust-analyzernittle show HEAD~2 --no-lspGo to a definition
Section titled “Go to a definition”Put the cursor on a line (j, k) and press gd. The keyboard moves a row, not a column, so the key acts on the word your pointer last rested on in that row. With no such word, it uses the row’s first identifier.
gdgoes to the definition. On the definition itself, it lists the references instead.gygoes to the type definition.ghshows the hover docs in a card.gAlists references in a panel, grouped by file, with the files in the diff first.gslists the symbols in this file, andgSsearches symbols across the repository.

The pointer works too. Ctrl+click (Cmd+click on macOS) goes to the definition, and holding the key shows words as links. Resting the pointer on a word shows its hover docs.
When a lookup finds several definitions, a picker lets you choose one. Ctrl+o comes back from any jump.

Read code outside the diff
Section titled “Read code outside the diff”A definition in a file outside the diff, such as node_modules or the standard library, opens in a read-only viewer. Inside it, gd, gy and Ctrl+click keep following definitions. j, k, gg and G scroll it. Ctrl+o steps back through the viewer hops, then returns to the diff.
A file outside the repository can’t be asked about. A lookup from one says “Definitions can only be followed from files in the repository, not from this file outside the repository.”
Esc closes the topmost layer first: the hover card, the picker, the symbols list, the viewer, then the references panel.
Removed lines and other revisions
Section titled “Removed lines and other revisions”A language server reads files from disk, so it can only answer for a revision that’s on disk. nittle never checks anything out in your repository to get there. Instead, a side of the review that isn’t your checkout gets a detached git worktree in your system temp directory:
- Working-tree and staged reviews use your repository as it is.
- A side at the commit your checkout is on, with a clean
git status, uses your repository too. - Every other side gets a worktree at its commit: the new side of a branch review or a range,
nittle show <commit>, and the old side of most reviews. That’s what makesgdandghwork on removed lines. - Browse mode has no old side, so removed-line lookups aren’t available there.
The worktrees live under <temp>/nittle-lsp-wt-<pid>-<random>/ (%TEMP% on Windows, $TMPDIR or /tmp elsewhere). They’re detached, so no branch is created and your HEAD, index and working tree are untouched. Git lists them under .git/worktrees/ while they exist.
A temp worktree has tracked files only. So a TypeScript server can see your packages, nittle links your node_modules into it for the repo root and each package with a tracked package.json (up to 50). Without a node_modules to link, navigation still works for the repository’s own files.
After you edit your checkout, press r before navigating again, since the clean check is cached until the next refresh.
They’re removed when the review ends. A hard kill (power loss, SIGKILL) leaves them behind, and nittle cleanup lists and removes them after you confirm. Run it from inside the repository.
What the servers can touch
Section titled “What the servers can touch”Language servers are programs you install. nittle runs the one it finds on PATH with your user rights and talks to it over stdio. It never downloads a server, and a server found inside the repository under review is ignored, so a checkout can’t plant its own. Only install servers you trust.
Servers start the first time something asks them a question, only for languages in the diff, and stop when nittle exits. Their logs go to a temp directory that is removed on exit. For C#, nittle asks Roslyn not to run automatic restore, which would create obj/ folders in your checkout.
The routes the browser uses for this are in the HTTP API reference.
Related pages
Section titled “Related pages”- Find text instead of symbols with Searching.
- See every key in Keyboard shortcuts.