packages/shared-skills/skills/lsp-setup/references/swift/README.md
sourcekit-lsp — sourcekit-lsp.swift .objc .objcppIncluded with Xcode or the Swift toolchainsourcekit-lsp ships with the Swift toolchain — no separate install.
xcode-select --install (or install full Xcode). It resolves to the active toolchain selected by xcode-select.sourcekit-lsp ships inside it); add the toolchain's usr/bin to PATH.sourcekit-lsp is bundled.Confirm it resolves:
command -v sourcekit-lsp
Builtin — usually NO config needed (auto-resolved by extension). Configure only to set priority, init options, override extensions, or disable. Same JSON shape in .codex/lsp-client.json (Codex) AND .opencode/lsp.json (OpenCode/omo):
{ "lsp": { "sourcekit-lsp": { "priority": 100 } } }
For builtin ids in a PROJECT config, command is supplied automatically — only set priority/initialization/extensions/disabled/env. A fully custom (non-builtin) server with its own command must go in the USER config (~/.codex/lsp-client.json).
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.
sourcekit-lsp is the official Apple/swift.org server and the only practical choice.sourcekit-lsp on PATH; reopen shell after install (or after xcode-select -s).xcode-select at the right Xcode/toolchain; mismatches cause stale or missing results.Package.swift / compile db: add a SwiftPM manifest or generate compile_commands.json for accurate indexing..objc/.objcpp): needs a compilation database to resolve headers and frameworks.bun ../../scripts/verify-lsp.ts path/to/File.swift