Configure Visual Studio Code for Swift development

1. Build sourcekit-lsp

https://github.com/apple/sourcekit-lsp#building-sourcekit-lsp

$ git clone https://github.com/apple/sourcekit-lsp.git
$ swift package update
$ swift build

The sourcekit-lsp will be here:

/Users/zhihuitang/repo/common/sourcekit-lsp/.build/x86_64-apple-macosx/debug/sourcekit-lsp

2. Configure sourcekit-lsp

In the sourcekit-lsp settings, set the Language Server Mode to sourcekit-lsp

Set Server Path:

Leave a comment