The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.
Swift — LSP setup
- Builtin server:
sourcekit-lsp—sourcekit-lsp - Extensions:
.swift .m .mm - Install hint:
Included with Xcode or the Swift toolchain
Install
sourcekit-lsp ships with the Swift toolchain — no separate install.
- macOS:
xcode-select --install(or install full Xcode). It resolves to the active toolchain selected byxcode-select. - Linux: Install a swift.org toolchain (
sourcekit-lspships inside it); add the toolchain'susr/binto PATH. - Windows: Install the swift.org Windows toolchain;
sourcekit-lspis bundled.
Confirm it resolves:
command -v sourcekit-lsp
Configure
Builtin — usually NO config needed (auto-resolved by extension). Configure only to set priority, init options, override extensions, or disable. Same JSON shape in every harness's project config (per-harness paths: the Configure step in SKILL.md):
{ "lsp": { "sourcekit-lsp": { "priority": 100 } } }
For builtin ids in a PROJECT config, command is supplied automatically — only set priority/initialization/extensions/disabled (a project entry drops env). env, and a fully custom (non-builtin) server with its own command, must go in your harness's USER config (see the Configure step in SKILL.md).
Initialization options (only if commonly needed)
None commonly required. For best results the project needs a SwiftPM Package.swift or a compile_commands.json compilation database so the server can resolve modules. Pure-Xcode-project files without these resolve poorly.
Alternatives
- No mainstream alternative.
sourcekit-lspis the official Apple/swift.org server and the only practical choice.
Troubleshooting
- PATH:
sourcekit-lspon PATH; reopen shell after install (or afterxcode-select -s). - Wrong toolchain (macOS): point
xcode-selectat the right Xcode/toolchain; mismatches cause stale or missing results. - No
Package.swift/ compile db: add a SwiftPM manifest or generatecompile_commands.jsonfor accurate indexing. - Objective-C (
.m/.mm): needs a compilation database to resolve headers and frameworks. - First build slow: the server builds the module graph on first open; wait for it.
Verify
bun ../../scripts/verify-lsp.ts path/to/File.swift