pronounced: [source kite] 😄
SDE's language server's backend which is written in Swift. You need to build this tool if you want to use SDE.
clone this project, then run build command in that project as follow:
sudo ln -s /usr/lib/sourcekitdInProc.framework/sourcekitdInProc /usr/lib/sourcekitdInProc
swift build -Xlinker -l:sourcekitdInProc
change the above linking location/option to your own when necessary)
the sourcekitd framework are not included in the the default official download. You can try a binary here with sourcekitd included, but note this is built in Ubuntu 16.04)
from 2.0.20170209, SDE makes a sourcekite docker image and adds a new experimental setting "swift.path.sourcekiteDockerMode" for easier adoption for Linux users. Make sure you have followed these steps:
- install and make docker workable in your system
- run docker pull jinmingjian/docker-sourcekite to get the docker image
- test against that the docker cmd 'docker run --rm -i jinmingjian/docker-sourcekite' works in your system
- set "swift.path.sourcekiteDockerMode" to true. Note, now the setting "swift.path.sourcekite" will be ignored.
swift build -Xswiftc -framework -Xswiftc sourcekitd -Xswiftc -F -Xswiftc /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/lib -Xlinker -rpath -Xlinker /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/lib
(NOTE: make sure you have installed the swift toolchain into that location. You can do this via download from offical site or swiftenv)
Finally set "swift.path.sourcekite" in vscode to let SDE know the location of this tool. It recommends to add this setting to the gloabl via "File" -> "Preferences" -> "Settings". Like:
{
"swift.path.sourcekite": "/path/to/repo/sourcekite/.build/debug/sourcekite"
}
file an issues if you have problem.
Apache License v2.