Settings claim that toolchain path defaults to Xcode default toolchain
and sourcekit-lsp path defaults to the one from the toolchain path
Neither claim is true. Both fields are empty on a fresh install and nothing works when they are empty. Unless you manually set them to the correct values, nothing will work.
Maybe /Applictations/Xcode.app has been hardcoded but that would be totally wrong. Xcode doesn't have to be named Xcode.app, you can name it Xcode 14.3.1 Beta 2.app if you like, totally valid, nor does it have to be in /Applications or even on your main drive at all.
Also you don't even need to install Xcode to get the SDK. The developer SDK is also available as a stand-alone download and it would install itself to /Library/Developer/CommandLineTools. It includes all the compilers and libraries, it just misses the Xcode IDE itself.
The correct path for sourcekit-lsp would be /usr/bin/sourcekit-lsp, which is a wrapper binary that always calls the real sourcekit-lsp from the currently active Xcode version or the currently active developer SDK.
To get the true path of the current sourcekit-lsp binary that /usr/bin/sourcekit-lsp actually calls, you have to run xcrun -find sourcekit-lsp, which in my case would return
Hi, thanks for opening an issue. But I decided to archive this repository as today there is no good reason to actually use this extension anymore. Please use the official swift extension from apple.
Settings claim that toolchain path defaults to Xcode default toolchain
and
sourcekit-lsp
path defaults to the one from the toolchain pathNeither claim is true. Both fields are empty on a fresh install and nothing works when they are empty. Unless you manually set them to the correct values, nothing will work.
Maybe
/Applictations/Xcode.app
has been hardcoded but that would be totally wrong. Xcode doesn't have to be namedXcode.app
, you can name itXcode 14.3.1 Beta 2.app
if you like, totally valid, nor does it have to be in/Applications
or even on your main drive at all.Also you don't even need to install Xcode to get the SDK. The developer SDK is also available as a stand-alone download and it would install itself to
/Library/Developer/CommandLineTools
. It includes all the compilers and libraries, it just misses the Xcode IDE itself.The correct path for
sourcekit-lsp
would be/usr/bin/sourcekit-lsp
, which is a wrapper binary that always calls the realsourcekit-lsp
from the currently active Xcode version or the currently active developer SDK.To get the true path of the current sourcekit-lsp binary that
/usr/bin/sourcekit-lsp
actually calls, you have to runxcrun -find sourcekit-lsp
, which in my case would returnor to just get the path using
xcode-select -p
:In case you don't have any Xcode installed or activated, but an SDK, it would print
/Library/Developer/CommandLineTools
.