Files
zed/docs/src/languages/swift.md
T
yenru0 74405573c9 gwen: Rebrand documentation to Gwen
Rewrite product prose and local path/command examples across the docs
to match the shipped application (gwen CLI, Gwen config paths, Gwen.app,
com.yrkaierx.Gwen). Upstream distribution channels, service URLs and
package identifiers stay factually intact.
2026-09-29 09:24:34 +09:00

2.0 KiB

title, description
title description
Swift Configure Swift language support in Gwen, including language servers, formatting, and debugging.

Swift

Swift language support in Gwen is provided by the community-maintained Swift extension. Report issues to: https://github.com/zed-extensions/swift/issues

Language Server Configuration

You can modify the behavior of SourceKit LSP by creating a .sourcekit-lsp/config.json under your home directory or in your project root. See SourceKit-LSP configuration file for complete documentation.

Debugging

The Swift extension provides a debug adapter for debugging Swift code. Gwen's name for the adapter (in the UI and debug.json) is Swift, and under the hood it uses lldb-dap, as provided by the Swift toolchain. The extension tries to find an lldb-dap binary using swiftly, using xcrun, and by searching $PATH, in that order of preference. The extension doesn't attempt to download lldb-dap if it's not found.

Examples

Build and debug a Swift binary

[
  {
    "label": "Debug Swift",
    "build": {
      "command": "swift",
      "args": ["build"]
    },
    "program": "$ZED_WORKTREE_ROOT/swift-app/.build/arm64-apple-macosx/debug/swift-app",
    "request": "launch",
    "adapter": "Swift"
  }
]