Файли
openidea/languages/swift.toml
T
LU XIANGRUIтаwildcatDownstairs 972f18331e feat(swift): offer a BSP config for Xcode projects (#6793)
sourcekit-lsp needs a Build Server Protocol config to understand .xcodeproj/.xcworkspace projects. It now also starts at roots marked by .bsp, *.xcworkspace or *.xcodeproj, and a project root with an Xcode project but no BSP config gets a notification offering to generate one with xcode-build-server or sourcekit-xcode-bsp from PATH (workspace preferred), then restarts sourcekit-lsp; without either tool it explains how to install one. The root is typed as a Swift project in the Project view.

Closes #6787

Co-authored-by: wildcatDownstairs <[email protected]>
2026-11-29 14:43:12 +08:00

30 рядки
907 B
TOML

id = "swift"
name = "Swift"
extensions = ["swift", "swiftinterface"]
line-comment = "//"
block-comment = ["/*", "*/"]
indent = { tab-size = 4, insert-spaces = true }
ui-mode = "Swift"
tree-sitter = "swift"
[[language-servers]]
name = "sourcekit-lsp"
command = "sourcekit-lsp"
# Xcode projects: sourcekit-lsp reads their build settings from a BSP config (`.bsp/*.json`, or the
# legacy `buildServer.json`); the IDE offers to generate one (xcode-build-server, sourcekit-xcode-bsp).
root-markers = [
"Package.swift",
".bsp",
"buildServer.json",
"compile_commands.json",
".sourcekit-lsp",
"*.xcworkspace",
"*.xcodeproj",
]
install-hint = "Ships with the Swift toolchain / Xcode (xcrun sourcekit-lsp); https://www.swift.org/install"
[debugger]
adapter = "lldb-dap"
command = "lldb-dap"
install-hint = "Ships with the Swift toolchain (swift 6+) or LLVM; on macOS it is found by xcrun -f lldb-dap"