Setup Swift LSP in nvim
up:: SwiftUI onboarding, nvim, iOS Development
This was a helpful start, but I needed some extra info: The complete guide to iOS & macOS development in Neovim
Set up basic swift lsp
Source: Swift.org - Configuring Neovim for Swift Development
Set up xcode-build-server
Follow steps here: SolaWing/xcode-build-server: a build server protocol implementation for integrate xcode with sourcekit-lsp. I’m not sure what it does, but it’s needed to give lsp information about your project, eg. Views that you created.
These are for some additional detail:
For example, if your app’s scheme name is called “Book to Instagram”. You can find the scheme in XCode.
- Go to the root of the project
- This is where
.git
folder is located, as well as/Book To Instagram.xcodeproj/
andBook-To-Instagram-Info.plist
- This is where
- Run this command:
- Check
buildServer.json
is created and"build_root"
looks like this:"/Users/joschuag/Library/Developer/Xcode/DerivedData/Book_To_Instagram-drbnymmcoilbagbgisylitgtfiqw"
- If the
"build_root"
doesn’t look like that, have a look at: [Fix] Cross References Not Working with LSP · Issue #55 · SolaWing/xcode-build-server
- If the