Chapter 4: Reading and debugging

Language server

Also called Go to definition, LSP

A program running beside your editor that understands your code's structure. It powers go to definition, find references, rename and the red underlines. Because it follows scope and imports, it knows which of five things called total you mean.

Search shows every place a word occurs. A language server shows the places that mean this thing, and that difference matters when something gets renamed. Agents can use one as well, and it is often worth setting up for them.

Say it to your agent

“Rename calculateTotal to orderTotal using the language server's rename, not find and replace. Then run bun run typecheck and show me that it is clean.”

The workshop

Name a word, or describe what you mean in everyday language.