Concepts
Code intelligence
LoopCode uses language servers for definitions, references, diagnostics and safe renames across your project — for 15 languages out of the box, and any other you configure.
What it gives the agent
With a language server, LoopCode does not have to guess from text search:
- Definition and references — where a symbol is defined, through imports, and every use of it: the exact symbol, not every word that matches.
- Callers, callees and implementations — the functions that call it or that it calls, and what implements an interface.
- Hover, outline and symbols — a symbol's type and documentation, a file's symbols with their line ranges, and a symbol found by name across the workspace, without reading whole files.
- Diagnostics — the errors an edit causes, in the edited file and in the files that use it, as soon as it is made.
- Rename — a symbol renamed everywhere it is used, as one reviewed diff applied all at once.
Supported languages
| Language | Detected from |
|---|---|
| TypeScript and JavaScript | .ts, .tsx, .js, .jsx and related files |
| Python | .py, .pyi |
| Rust | .rs with Cargo.toml |
| Go | .go with go.mod or go.work |
| C and C++ | .c, .h, .cc, .cpp and related files |
| Swift | .swift with Package.swift |
| Java | .java with Maven or Gradle |
| Kotlin | .kt, .kts with Gradle |
| C# | .cs |
| Ruby | .rb, .rake, .gemspec |
| PHP | .php |
| Dart | .dart with pubspec.yaml |
| Lua | .lua |
| Zig | .zig |
| Shell | .sh, .bash, .zsh |
A server starts when the agent first reads a file in that language. If the server is not on your PATH and can be downloaded, LoopCode fetches it for itself. Set LOOPCODE_LSP_DOWNLOAD=0 to turn downloads off and use only servers you installed.
/lsp in the terminal, or Settings → Agent behavior in the desktop app, shows the language servers in use and their state.
Add another language
Configure your own servers in ~/.loopcode/settings.json:
{
"lsp": {
"elixir": {
"command": "elixir-ls",
"extensions": [".ex", ".exs"],
"rootMarkers": ["mix.exs"]
}
}
}| Field | Meaning |
|---|---|
command | The program that runs the server |
args | Its arguments |
extensions | The file extensions it handles |
rootMarkers | Files that mark a project's root |
env | Environment variables for it |
Language servers are read only from your own settings file, never from a repository's: a server starts when the agent reads a file, so a cloned repository must never choose a program to run on your machine.